本文整理汇总了PHP中Zend_Controller_Action_Helper_ViewRenderer类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Controller_Action_Helper_ViewRenderer类的具体用法?PHP Zend_Controller_Action_Helper_ViewRenderer怎么用?PHP Zend_Controller_Action_Helper_ViewRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Controller_Action_Helper_ViewRenderer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getViewRenderer
/**
* Retrieves the view renderer object
*
* @return Zend_Controller_Action_Helper_ViewRenderer|null
* @throws Glitch_Application_Resource_Exception
*/
public function getViewRenderer()
{
if (null === $this->_viewRenderer) {
// Pull in the front controller; bootstrap first if necessary
$this->_bootstrap->bootstrap('FrontController');
$front = $this->_bootstrap->getResource('FrontController');
// Ignore if no view renderer is to be used
if ($front->getParam('noViewRenderer')) {
return null;
}
// Get existing renderer, if any, or create a new one
$this->_viewRenderer = Zend_Controller_Action_HelperBroker::hasHelper('viewRenderer') ? Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer') : new $this->_className(null, $this->getOptions());
// Dynamic class loading; perform sanity check
if (!$this->_viewRenderer instanceof Zend_Controller_Action_Helper_ViewRenderer) {
throw new Glitch_Application_Resource_Exception('Class is not a valid view renderer instance');
}
// Register the view as the default view for handling view scripts
$this->_bootstrap->bootstrap('View');
$view = $this->_bootstrap->getResource('View');
$this->_viewRenderer->setView($view);
// It is paramount to set this base path spec: ZF otherwise uses its own
// spec, causing it to create a path to a conventional ZF-style directory
$this->_viewRenderer->setViewBasePathSpec(':module/' . Glitch_View::PATH_VIEW);
// Set empty inflector settings: all path translations are handled by the custom dispatcher
$inflector = new Zend_Filter_Inflector();
$inflector->addRules(array(':module' => array(), ':controller' => array(), ':action' => array()));
$this->_viewRenderer->setInflector($inflector, true);
if (!Zend_Controller_Action_HelperBroker::hasHelper('viewRenderer')) {
Zend_Controller_Action_HelperBroker::addHelper($this->_viewRenderer);
}
}
return $this->_viewRenderer;
}
开发者ID:nstapelbroek,项目名称:Glitch_Lib,代码行数:39,代码来源:Viewrenderer.php
示例2: setupView
/**
* Configures view class
*
*/
protected function setupView()
{
if (Zend_Registry::isRegistered('config')) {
$config = Zend_Registry::get('config');
$renderClass = $config->output->viewrenderer;
$viewRenderer = new $renderClass();
$viewClass = $config->output->view->name;
$viewRenderer->setView(new $viewClass($config->output->view->options->toArray()));
} else {
// Config file not detected, use defaults
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView(new Zoo_View_Php());
}
$viewRenderer->setViewSuffix('phtml');
//make it search for .phtml files
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
//add it to the action helper broker
// Set the encoding
$viewRenderer->view->setEncoding("UTF-8");
$doctypeHelper = new Zend_View_Helper_Doctype();
$doctypeHelper->doctype('XHTML1_STRICT');
// Add core module's view helper path
$viewRenderer->view->addHelperPath(ZfApplication::$_base_path . "/app/Zoo/views/helpers");
// Add JQuery support
$viewRenderer->view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
$viewRenderer->view->jQuery()->setVersion('1.5')->setUIVersion('1.8')->addStylesheet('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css');
}
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:31,代码来源:Http.php
示例3: _initViewHelpers
protected function _initViewHelpers()
{
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$view->addHelperPath('Base/View/Helper/', 'Base_View_Helper');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
ZendX_JQuery::enableView($view);
/*------ default blocks in the region right ---*/
/*$blockM=new Base_View_Block();
$path="/layouts/scripts/page/blocks/journal";
$blocks=array("name"=>"search-destination", "order"=>"10", "path"=>$path);
$blockM->addBlock($blocks, 'journal');
$blocks=array("name"=>"right-banner", "order"=>"9", "path"=>$path);
$blockM->addBlock($blocks, 'journal');
$blocks=array("name"=>"recent-blog", "order"=>"8", "path"=>$path);
$blockM->addBlock($blocks, 'journal');
$blocks=array("name"=>"journal-categories", "order"=>"7", "path"=>$path);
$blockM->addBlock($blocks, 'journal');
$blocks=array("name"=>"tag-cloud", "order"=>"6", "path"=>$path);
$blockM->addBlock($blocks, 'journal');*/
/*------ default blocks in the region right ---*/
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:27,代码来源:Bootstrap.php
示例4: _initView
protected function _initView()
{
$theme = 'default';
$templatePath = APPLICATION_PATH . '/../public/themes/' . $theme . '/templates';
Zend_Registry::set('user_date_format', 'm-d-Y');
Zend_Registry::set('calendar_date_format', 'mm-dd-yy');
Zend_Registry::set('db_date_format', 'Y-m-d');
Zend_Registry::set('perpage', 10);
Zend_Registry::set('menu', 'home');
Zend_Registry::set('eventid', '');
$dir_name = $_SERVER['DOCUMENT_ROOT'] . rtrim(str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']), '/');
Zend_Registry::set('acess_file_path', $dir_name . SEPARATOR . "application" . SEPARATOR . "modules" . SEPARATOR . "default" . SEPARATOR . "plugins" . SEPARATOR . "AccessControl.php");
Zend_Registry::set('siteconstant_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "site_constants.php");
Zend_Registry::set('emailconstant_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "email_constants.php");
Zend_Registry::set('emptab_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "emptabconfigure.php");
Zend_Registry::set('emailconfig_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "mail_settings_constants.php");
Zend_Registry::set('application_file_path', $dir_name . SEPARATOR . "public" . SEPARATOR . "application_constants.php");
$date = new Zend_Date();
Zend_Registry::set('currentdate', $date->get('yyyy-MM-dd HH:mm:ss'));
Zend_Registry::set('currenttime', $date->get('HH:mm:ss'));
Zend_Registry::set('logo_url', '/public/images/landing_header.jpg');
$view = new Zend_View();
$view->setEscape('stripslashes');
$view->setBasePath($templatePath);
$view->setScriptPath(APPLICATION_PATH);
$view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
return $this;
}
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:31,代码来源:Bootstrap.php
示例5: _initView
protected function _initView()
{
$view = new Zend_View();
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}
开发者ID:maniargaurav,项目名称:OurBank,代码行数:8,代码来源:Bootstrap.php
示例6: init
/**
* Defined by Zend_Application_Resource_Resource
*
* @return Zend_View
*/
public function init()
{
$view = $this->getView();
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
return $view;
}
开发者ID:bizanto,项目名称:Hooked,代码行数:13,代码来源:View.php
示例7: _initView
protected function _initView()
{
$view = new Zend_View();
$view->doctype('XHTML1_STRICT');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}
开发者ID:abtris,项目名称:jqueryZend,代码行数:9,代码来源:Bootstrap.php
示例8: _initView
/**
* Initializes a new view object and loads the view directories into it.
* @return Zend_View
*/
protected function _initView()
{
$view = new Zend_View();
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
$view->addHelperPath(realpath(implode(DIRECTORY_SEPARATOR, array(ROOT_PATH, 'library', 'Fizzy', 'View', 'Helper'))), 'Fizzy_View_Helper');
$view->addHelperPath(realpath(implode(DIRECTORY_SEPARATOR, array(ROOT_PATH, 'library', 'ZendX', 'JQuery', 'View', 'Helper'))), 'ZendX_JQuery_View_Helper');
return $view;
}
开发者ID:jtietema,项目名称:Fizzy,代码行数:14,代码来源:Bootstrap.php
示例9: _initViewHelpers
function _initViewHelpers()
{
// Config view Zend_Dojo
$view = new Zend_View();
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
// End Config view Zend_Dojo
}
开发者ID:samlanh,项目名称:currencyms,代码行数:10,代码来源:Bootstrap.php
示例10: initView
/**
* @return \Application\Smarty\ZendSmarty
*/
protected function initView()
{
$view = $this->getDICContainer()->get('zend_smarty');
$view->getEngine()->setZendView($view);
$viewHelper = new \Zend_Controller_Action_Helper_ViewRenderer($view);
$viewHelper->setViewSuffix('tpl');
\Zend_Controller_Action_HelperBroker::addHelper($viewHelper);
$this->getEventDispatcher()->dispatch('bootstrap.init_view', new EventParameters(array('view' => $view)));
return $view;
}
开发者ID:Eximagen,项目名称:sochi,代码行数:13,代码来源:Bootstrap.php
示例11: _initDoctype
protected function _initDoctype()
{
$this->bootstrap('view');
// $view = $this->getResource('view');
// $view->doctype('XHTML1_STRICT');
$view = new Zend_View();
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}
开发者ID:robertsonmello,项目名称:projetos,代码行数:11,代码来源:Bootstrap.php
示例12: _initView
protected function _initView()
{
$baseUrl = substr($_SERVER['PHP_SELF'], 0, -9);
$view = new Zend_View();
$view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
$view->jQuery()->uiEnable();
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
$view->jQuery()->addStylesheet($baseUrl . 'js/jquery/css/overcast/jquery-ui-1.8.11.custom.css')->setLocalPath($baseUrl . 'js/jquery/js/jquery-1.5.1.min.js')->setUiLocalPath($baseUrl . 'js/jquery/js/jquery-ui-1.8.11.custom.min.js');
}
开发者ID:patali,项目名称:aomi,代码行数:11,代码来源:Bootstrap.php
示例13: _initNaneau
public function _initNaneau()
{
/** Naneau_View_Smarty */
require_once 'Naneau/View/Smarty.php';
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView(new Naneau_View_Smarty(array('compileDir' => APPLICATION_PATH . '/../tmp/templates_c')));
$viewRenderer->setViewSuffix('tpl');
//make it search for .tpl files
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
//add it to the action helper broker
}
开发者ID:vinnivinsachi,项目名称:Vincent-DR,代码行数:11,代码来源:Bootstrap.php
示例14: _initDoctype
protected function _initDoctype()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
$view->doctype('XHTML1_STRICT');
$view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}
开发者ID:JosefinaArayaTapia,项目名称:Capicua-Restobar,代码行数:11,代码来源:Bootstrap.php
示例15: _initView
/**
* ブートストラップ
*
* @return void
*/
protected function _initView()
{
/*
* Zend_Controller_Action_Helper_ViewRendererオブジェクトに
* Zend_View_Smartyクラスを登録
*/
$view = new Zend_View_Smarty(TEMPLATES_PATH, array('compile_dir' => SMARTY_COMPILE_PATH, 'cache_dir' => SMARTY_CACHE_PATH));
$render = new Zend_Controller_Action_Helper_ViewRenderer($view);
$render->setViewBasePathSpec(':moduleDir' . ABSOLUTE_VIEWS_TEMPLATE_PATH)->setViewSuffix('tpl');
// ヘルパーブローカにViewRendererヘルパーを登録
Zend_Controller_Action_HelperBroker::addHelper($render);
}
开发者ID:Hackason-TemaShibasaki,项目名称:ProjectHackathon,代码行数:17,代码来源:Bootstrap.php
示例16: _initViewHelpers
function _initViewHelpers()
{
$view = new Zend_View();
$view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');
$view->headMeta()->appendHttpEquiv('X-UA-Compatible', "IE=edge,chrome=1");
$view->headMeta()->appendHttpEquiv('PRAGMA', "NO-CACHE");
$view->headMeta()->setCharset('UTF-8');
$view->headMeta()->appendName("viewport", "width=device-width,initial-scale=1.0");
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}
开发者ID:vmangla,项目名称:evendor,代码行数:12,代码来源:Bootstrap.php
示例17: _initViewHelpers
protected function _initViewHelpers()
{
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$view->addHelperPath('Base/View/Helper/', 'Base_View_Helper');
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
ZendX_JQuery::enableView($view);
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:12,代码来源:Bootstrap.php
示例18: init
public function init()
{
$view = $this->getSmarty();
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view)->setViewSuffix('tpl');
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
$this->layoutReset();
Zend_Controller_Action_HelperBroker::addPrefix('Base_Controller_Action_Helper');
Zend_Controller_Action_HelperBroker::addPrefix('Base_Controller_Action_Helper_Messenger');
$config = Zend_Registry::get('config');
$view->config = $config['smarty'];
return $view;
}
开发者ID:knatorski,项目名称:SMS,代码行数:13,代码来源:Smarty.php
示例19: _initDojo
protected function _initDojo()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$view->dojo()->setLocalPath('/js/dojo/dojo.js');
$view->dojo()->addStylesheetModule('dijit.themes.tundra');
$view->dojo()->setDjConfigOption('usePlainJson', true);
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
}
开发者ID:joseph-montanez,项目名称:ZendTickets,代码行数:13,代码来源:Bootstrap.php
示例20: _initHelper
protected function _initHelper()
{
$lib_path = APPLICATION_PATH . "/lib";
$view = new Zend_View();
$view->addHelperPath("Cible/View/Helper", "Cible_View_Helper");
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$view->addBasePath("{$lib_path}/Cible/View");
$view->addBasePath("{$lib_path}/ZendX/JQuery/View");
$view->addBasePath("{$lib_path}/Cible/Validate");
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}
开发者ID:anunay,项目名称:stentors,代码行数:13,代码来源:Cron.php
注:本文中的Zend_Controller_Action_Helper_ViewRenderer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论