• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_View_Interface类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Zend_View_Interface的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View_Interface类的具体用法?PHP Zend_View_Interface怎么用?PHP Zend_View_Interface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Zend_View_Interface类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: enableView

 /**
  * jQuery-enable a view instance
  *
  * @param  \Zend_View_Interface $view
  * @return void
  */
 public static function enableView(\Zend_View_Interface $view)
 {
     if (false === $view->getPluginLoader('helper')->getPaths('MUtil_JQuery_View_Helper')) {
         $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
         $view->addHelperPath('MUtil/JQuery/View/Helper', 'MUtil_JQuery_View_Helper');
     }
 }
开发者ID:GemsTracker,项目名称:MUtil,代码行数:13,代码来源:JQuery.php


示例2: plug

 /**
  * Assign the plugin to the view
  * 
  * @param Zend_View_Interface $view
  */
 public function plug(Zend_View_Interface $view)
 {
     $view->addBasePath($this->getTemplatePath());
     if (!isset($view->plugins)) {
         $view->plugins = array();
     }
     $view->plugins[$this->getPHTML()] = $this->getDataArray();
 }
开发者ID:DBezemer,项目名称:server,代码行数:13,代码来源:PartialViewPlugin.php


示例3: renderLabel

 public function renderLabel(Zend_Form_Element $element, Zend_View_Interface $view)
 {
     $label = $element->getLabel();
     if (empty($label)) {
         $label = $element->getName();
     }
     return '<div class="pointer" onClick = goToErrorLabel(\'' . $element->getId() . '\')>' . $this->getMarkupElementLabelStart() . $view->escape($label) . $this->getMarkupElementLabelEnd() . '</div>';
 }
开发者ID:knatorski,项目名称:SMS,代码行数:8,代码来源:FormErrorsGoTo.php


示例4: __construct

 /**
  * @param TemplateLocatorInterface $locator
  * @param ContainerInterface $container
  * @param TemplateNameParserInterface $parser
  * @param Zend_View_Interface $zendView
  */
 public function __construct(FileLocatorInterface $locator, ContainerInterface $container, TemplateNameParserInterface $parser, $zendView)
 {
     $this->locator = $locator;
     $this->container = $container;
     $this->parser = $parser;
     $this->view = $zendView;
     // Zend View is not able to handle absolute paths except with this little trick
     $this->view->setScriptPath('');
 }
开发者ID:richardfullmer,项目名称:WhitewashingZFMvcCompatBundle,代码行数:15,代码来源:ZendViewEngine.php


示例5: setView

 public function setView(Zend_View_Interface $view = null)
 {
     if (null !== $view) {
         if (false === $view->getPluginLoader('helper')->getPaths('Ynresponsiveevent_Widget_EventFooterAbout_View_Helper')) {
             $view->addHelperPath(APPLICATION_PATH . '/application/modules/Ynresponsiveevent/widgets/event-footer-about/View/Helper', 'Ynresponsiveevent_Widget_EventFooterAbout_View_Helper');
         }
     }
     return parent::setView($view);
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:9,代码来源:TinyMceYN.php


示例6: getHtml

 /**
  *
  * @static
  * @param string $value
  * @param Zend_View_Interface $view
  * @return string
  */
 public static function getHtml($value, Zend_View_Interface $view = null)
 {
     $value = Zend_Json_Decoder::decode($value);
     $html = '';
     foreach (self::_getOptions() as $options) {
         $html .= $options['name'] . ' ' . $view->formText('confValue[' . $options['name'] . ']', $value[$options['id']], array('size' => '50'));
     }
     return $html;
 }
开发者ID:rommmka,项目名称:axiscommerce,代码行数:16,代码来源:CacheTagLifetime.php


示例7: setView

 /**
  * Set the view object
  *
  * Ensures that the view object has the dojo view helper path set.
  * 
  * @param  Zend_View_Interface $view 
  * @return Zend_Dojo_Form_Element_Dijit
  */
 public function setView(Zend_View_Interface $view = null)
 {
     if (null !== $view) {
         if (false === $view->getPluginLoader('helper')->getPaths('Zend_Dojo_View_Helper')) {
             $view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper');
         }
     }
     return parent::setView($view);
 }
开发者ID:VUW-SIM-FIS,项目名称:emiemi,代码行数:17,代码来源:DisplayGroup.php


示例8: _escape

 /**
  * Escape a string
  * 
  * @param  string $string 
  * @return string
  */
 protected function _escape($string)
 {
     if ($this->view instanceof Zend_View_Interface) {
         return $this->view->escape($string);
     }
     return htmlentities((string) $string, null, 'UTF-8');
 }
开发者ID:Mendim,项目名称:gtv-resources,代码行数:13,代码来源:Standalone.php


示例9: checkSkinStyles

 /**
  *
  */
 public function checkSkinStyles($name, $values)
 {
     $config = Zend_Registry::get('config');
     $basePath = $config->design->pathToSkins;
     $xhtml = array();
     $this->view->name = $name;
     $this->view->selectedStyles = $values;
     //load the skin folders
     if (is_dir('./' . $basePath)) {
         $folders = Digitalus_Filesystem_Dir::getDirectories('./' . $basePath);
         if (count($folders) > 0) {
             foreach ($folders as $folder) {
                 $this->view->skin = $folder;
                 $styles = Digitalus_Filesystem_File::getFilesByType('./' . $basePath . '/' . $folder . '/styles', 'css');
                 if (is_array($styles)) {
                     foreach ($styles as $style) {
                         //add each style sheet to the hash
                         // key = path / value = filename
                         $hashStyles[$style] = $style;
                     }
                     $this->view->styles = $hashStyles;
                     $xhtml[] = $this->view->render($this->partialFile);
                     unset($hashStyles);
                 }
             }
         }
     } else {
         throw new Zend_Acl_Exception('Unable to locate skin folder');
     }
     return implode(null, $xhtml);
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:34,代码来源:CheckSkinStyles.php


示例10: pagination

 /**
  * Generates a list of pagination links
  *
  * @param  QFrame_Paginator paginator object
  * @param  string         (optional) action to use for page link
  * @param  string         (optional) variable to use for page number
  * @param  Array          (optional) list of additional parameters to add to each link
  * @return string
  */
 public function pagination($pager, $action = 'page', $pageNum = 'id', $params = array())
 {
     if (count($pager->pageNumbers()) <= 1) {
         return '';
     }
     $controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $b = new Tag_Builder();
     $content = '';
     // set up an array of arguments that are common to all links
     $linkArgs = array_merge($params, array('controller' => $controller, 'action' => $action));
     // print out links to each page number (unless it is the current page number
     // in which case print out just the number, no link)
     foreach ($pager->pageNumbers() as $page) {
         if ($page == $pager->currentNumber()) {
             $pageContent = "{$page} ";
         } else {
             $linkArgs[$pageNum] = $page;
             $pageContent = $this->_view->linkTo($linkArgs, "{$page}") . ' ';
         }
         $content .= $b->li($pageContent);
     }
     // prepend a previous page link if there is/are previous page(s), otherwise
     // just the equivalent text
     if ($pager->currentNumber() > 1) {
         $linkArgs[$pageNum] = $pager->currentNumber() - 1;
         $content = $b->li($this->_view->linkTo($linkArgs, '< prev'), ' ', $content);
     }
     // append a next page link if there is/are next page(s), otherwise just
     // the equivalent text
     if ($pager->currentNumber() < $pager->lastPageNumber()) {
         $linkArgs[$pageNum] = $pager->currentNumber() + 1;
         $content .= $b->li($this->_view->linkTo($linkArgs, 'next >'), ' ');
     }
     return $b->ol(array('class' => 'pagination'), $content);
 }
开发者ID:humansky,项目名称:qframe,代码行数:44,代码来源:Pagination.php


示例11: isValid

 /**
  * Make sure the user is valid
  *
  * @return void
  */
 public function isValid($value)
 {
     $valid = true;
     $this->_user = $value;
     $namePartsValidator = new Zend_Validate();
     $namePartsValidator->addValidator(new Zend_Validate_NotEmpty(Zend_Validate_NotEmpty::STRING))->addValidator(new Zend_Validate_Alpha(array('allowWhiteSpace' => true)))->addValidator(new Zend_Validate_StringLength(array('min' => 2)));
     if (!$namePartsValidator->isValid($this->_user->getFirstName())) {
         $valid = false;
         $this->_error($this->_view->translate('The first name must have at least 2 characters and consist only of letters'));
     }
     if (!$namePartsValidator->isValid($this->_user->getLastName())) {
         $valid = false;
         $this->_error($this->_view->translate('The last name must have at least 2 characters and consist only of letters'));
     }
     $emailValidator = new Zend_Validate_EmailAddress();
     if (!$emailValidator->isValid($this->_user->getEmail())) {
         $valid = false;
         $this->_error($this->_view->translate('You must entre a valid email'));
     }
     if ($this->_user->isNew()) {
         $usernameValidator = new Zend_Validate();
         $usernameValidator->addValidator(new Zend_Validate_NotEmpty(Zend_Validate_NotEmpty::STRING))->addValidator(new Zend_Validate_Alnum(array('allowWhiteSpace' => false)))->addValidator(new Zend_Validate_StringLength(array('min' => 5)));
         if (!$usernameValidator->isValid($this->_user->getUsername())) {
             $this->_error($this->_view->translate('The username must have at least 5 characters and contains no white spaces'));
         }
     }
     return $valid;
 }
开发者ID:EricHogue,项目名称:Koryukan,代码行数:33,代码来源:UserValidator.php


示例12: expireHeader

 /**
  * Constructor do Helper. Utilizado para setar o quando deve-se adicionar ao timestamp da data atual.
  * @param $dias
  * @param $meses
  * @param $anos
  */
 public function expireHeader($dias = 10, $meses = 0, $anos = 0)
 {
     $this->timestamp = mktime(date('H'), date('i'), date('s'), date('m') + $meses, date('d') + $dias, date('Y') + $anos);
     $this->view->headMeta()->appendName('expires', date('r', $this->timestamp));
     $this->view->headMeta()->appendHttpEquiv('Expires', date('r', $this->timestamp));
     return null;
 }
开发者ID:vilmarsitio,项目名称:registrodeprecos,代码行数:13,代码来源:ExpireHeader.php


示例13: indexAction

 public function indexAction()
 {
     // STAGE 3: Choose, create, and optionally update models using business logic.
     $cities = parse_ini_file('cities.ini');
     // $cities contains our simple data model
     // STAGE 4: Apply business logic to create a presentation model for the view.
     ksort($_SERVER);
     $this->_view->SERVER = $_SERVER;
     $this->_view->date = date('Y-m-d H:i:s');
     $this->_view->cities = array();
     $this->_view->distances = array();
     if (isset($_REQUEST['distance'])) {
         $maxDistance = intval($_REQUEST['distance']);
     } else {
         $this->_redirect('/?distance=10000');
     }
     $this->_view->maxDistance = $maxDistance;
     foreach ($cities as $city => $distance) {
         // business logic specifies to filter the data model satisfying distance criteria
         if ($distance < $maxDistance) {
             $this->_view->cities[] = $city;
             $this->_view->distances[] = $distance;
             #echo "Distance from London, UK to $city is $distance km.<br>\n";
         }
     }
     // STAGE 5: Choose view and submit presentation model to view.
     $this->_response->appendBody($this->_view->render('indexIndex.phtml'));
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:28,代码来源:IndexController.php


示例14: getParamArr

 public function getParamArr()
 {
     foreach ((array) $this->_emailContent->getViewAssignments() as $assign) {
         $this->_view->assign($assign[0], $assign[1]);
     }
     $arr = array('password' => self::VALIDATION_PASSWORD, 'to' => $this->_emailContent->getTo(), 'subject' => $this->_emailContent->getSubject(), 'body' => $this->renderBody($this->_emailContent->getViewScript()));
     return $arr;
 }
开发者ID:shevron,项目名称:zend-simplecal,代码行数:8,代码来源:JqEmail.php


示例15: stringifyCall

 /**
  * Returns a readable version of a call in a stack trace (returned by Exception->getTrace())
  *
  * @param  Array single call in the call stack
  * @return string
  */
 public function stringifyCall($call)
 {
     $string = "{$this->relativizePath($call['file'])}({$call['line']}): ";
     if (isset($call['class'])) {
         $string .= "{$call['class']}{$call['type']}";
     }
     $string .= "{$call['function']}({$this->stringifyParameters($call)})";
     return $this->view->h($string);
 }
开发者ID:humansky,项目名称:qframe,代码行数:15,代码来源:ErrorHelpers.php


示例16: escapeCheckEmpty

 /**
  * Fungsi escapeCheckEmpty
  *
  * @param string $date tanggal yang mau diformat
  * @param integer $format jenis format yang mau dilakukan
  *
  * @return string tanggal yang sudah diformat
  */
 public function escapeCheckEmpty($input)
 {
     $output = '';
     if (empty($input)) {
         $output = '-';
     } else {
         $output = $this->view->escape($input);
     }
     return $output;
 }
开发者ID:abdulhadikaryana,项目名称:kebudayaan,代码行数:18,代码来源:EscapeCheckEmpty.php


示例17: selectLanguage

 /**
  *
  */
 public function selectLanguage($name, $value, $attribs = null)
 {
     //select version
     $config = Zend_Registry::get('config');
     $siteVersions = $config->language->translations;
     foreach ($siteVersions as $locale => $label) {
         $data[$locale] = $this->view->getTranslation($label);
     }
     return $this->view->formSelect($name, $value, $attribs, $data);
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:13,代码来源:SelectLanguage.php


示例18: profileLink

 public function profileLink()
 {
     $baseUrl = $this->view->baseUrl();
     $auth = Zend_Auth::getInstance();
     $html = '<a href="' . $baseUrl . '/user/login"> Login </a>';
     if ($auth->hasIdentity()) {
         $html = '<a href="' . $baseUrl . '/user/logout"> Logout </a>';
     }
     return $html;
 }
开发者ID:modulexcite,项目名称:zfopenid,代码行数:10,代码来源:ProfileLink.php


示例19: getView

 /**
  * Retrieve view object
  *
  * @return Zend_View
  */
 public function getView()
 {
     if (null === $this->_view) {
         $options = $this->getOptions();
         $this->_view = new Zend_View($options);
         if (isset($options['doctype'])) {
             $this->_view->doctype()->setDoctype(strtoupper($options['doctype']));
         }
     }
     return $this->_view;
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:16,代码来源:View.php


示例20: menu

 /**
  * @return string
  */
 public function menu()
 {
     $model = new Site_Model_Menu();
     $items = $model->fetchAll(null, 'orderid');
     $activeItem = $model->fetchRow(array('"' . addcslashes($this->view->url(), "'") . '" LIKE CONCAT("%",url,"%")'), 'LENGTH(url) desc');
     $this->view->items = $items;
     if ($activeItem) {
         $this->view->activeId = $activeItem->id;
     }
     return $this->view->render('menu.phtml');
 }
开发者ID:Konstnantin,项目名称:zf-app,代码行数:14,代码来源:Menu.php



注:本文中的Zend_View_Interface类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Wildfire_Channel_HttpHeaders类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_View_Helper_Url类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap