当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Controller_Action_HelperBroker::addPath方法代码示例

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


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

示例1: _initAutoload

 protected function _initAutoload()
 {
     $autoloader = new Zend_Application_Module_Autoloader(array('namespace' => 'Tweetist_', 'basePath' => APPLICATION_PATH));
     Zend_Controller_Action_HelperBroker::addPrefix('Tweetist_Controllers_Helpers');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     return $autoloader;
 }
开发者ID:rowan-m,项目名称:tweetist,代码行数:7,代码来源:Bootstrap.php

示例2: _initAutoload

 protected function _initAutoload()
 {
     Zend_Loader_Autoloader::getInstance()->registerNamespace('PHPExcel');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/helpers');
     $autoloader = new Zend_Loader_Autoloader_Resource(array('namespace' => 'Default', 'basePath' => APPLICATION_PATH, 'resourceTypes' => array('form' => array('path' => 'forms', 'namespace' => 'Form'), 'model' => array('path' => 'models', 'namespace' => 'Model'), 'service' => array('path' => 'services', 'namespace' => 'Service'))));
     return $autoloader;
 }
开发者ID:jakubmalusevic,项目名称:Zend-website1,代码行数:7,代码来源:Bootstrap.php

示例3: init

 public function init()
 {
     $registry = Zend_Registry::getInstance();
     $config = $registry->get("config");
     $sysCache = $registry->get("sysCache");
     $cacheFiles = new Ml_Cache_Files($sysCache);
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     $frontController = $this->getBootstrap()->getResource('FrontController');
     $dispatcher = $frontController->getDispatcher();
     $request = $frontController->getRequest();
     $router = $frontController->getRouter();
     $router->removeDefaultRoutes();
     $compat = new Zend_Controller_Router_Route_Module(array(), $dispatcher, $request);
     $router->addRoute(HOST_MODULE, $compat);
     $routerConfig = $cacheFiles->getConfigIni(APPLICATION_PATH . '/configs/' . HOST_MODULE . 'Routes.ini');
     $router->addConfig($routerConfig, "apiroutes");
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/' . HOST_MODULE . '/controllers/helpers');
     $loadOauthStore = Zend_Controller_Action_HelperBroker::getStaticHelper("LoadOauthstore");
     $loadOauthStore->setinstance();
     $loadOauthStore->preloadServer();
     $frontController->setBaseUrl($config['apiroot'])->setParam('noViewRenderer', true)->addModuleDirectory(APPLICATION_PATH . '/modules')->addControllerDirectory(APPLICATION_PATH . '/modules/' . HOST_MODULE . '/controllers');
     $response = new Zend_Controller_Response_Http();
     if (filter_input(INPUT_GET, "responseformat", FILTER_UNSAFE_RAW) == 'json') {
         $contentType = 'application/json';
     } else {
         $contentType = 'text/xml';
     }
     $response->setHeader('Content-Type', $contentType . '; charset=utf-8', true);
     $frontController->setResponse($response);
 }
开发者ID:henvic,项目名称:MediaLab,代码行数:30,代码来源:Api.php

示例4: init

 public function init()
 {
     $path = APPLICATION_PATH . '/application/modules/SocialConnect/Controller/Action/Helper/';
     $prefix = 'SocialConnect_Controller_Action_Helper_';
     $this->view->addScriptPath(APPLICATION_PATH . '/application/modules/User/views/scripts');
     Zend_Controller_Action_HelperBroker::addPath($path, $prefix);
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:7,代码来源:SignupController.php

示例5: routeStartup

 public function routeStartup(Zend_Controller_Request_Abstract $request)
 {
     $front = Zend_Controller_Front::getInstance();
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     if (!isset($viewRenderer->view)) {
         $viewRenderer->initView();
     }
     $view = $viewRenderer->view;
     foreach ($front->getControllerDirectory() as $moduleName => $controllerPath) {
         $loader = new Zend_Application_Module_Autoloader(array('namespace' => ucfirst($moduleName), 'basePath' => dirname($controllerPath)));
         $loader->addResourceType('controller', 'controllers', 'Controller');
         $loader->addResourceType('constant', 'constants', 'Constant');
         $loader->addResourceType('php', 'phps', 'Php');
         $loader->addResourceType('validate', 'validates', 'Validate');
         $loader->addResourceType('module_helper', 'helpers', 'Helper');
         $loader->addResourceType('helper', 'controllers/helpers', 'Controller_Helper');
         Zend_Controller_Action_HelperBroker::addPath($controllerPath . DS . 'helpers', ucfirst($moduleName) . '_Controller_Helper_');
         $viewHelpers = array('View' => dirname($controllerPath) . DS . 'views' . DS . 'helpers', 'Display' => dirname($controllerPath) . DS . 'display' . DS . 'helpers');
         foreach ($viewHelpers as $directory => $viewHelper) {
             if (is_dir($viewHelper)) {
                 $view->addHelperPath($viewHelper);
                 $prefix = ucfirst($moduleName) . '_' . $directory . '_Helper';
                 $view->addHelperPath($viewHelper, $prefix);
             }
         }
     }
 }
开发者ID:HuyTran0424,项目名称:noeavrsev345452dfgdfgsg,代码行数:27,代码来源:Preparing.php

示例6: init

 public function init()
 {
     $registry = Zend_Registry::getInstance();
     $config = $registry->get("config");
     $sysCache = $registry->get("sysCache");
     $cacheFiles = new Ml_Cache_Files($sysCache);
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     $frontController = $this->getBootstrap()->getResource('FrontController');
     $dispatcher = $frontController->getDispatcher();
     $request = $frontController->getRequest();
     $router = $frontController->getRouter();
     $router->removeDefaultRoutes();
     //@todo remove this patched route module and use the original instead ASAP
     $compat = new Ml_Controller_Router_Route_Module(array(), $dispatcher, $request);
     $router->addRoute("default", $compat);
     $routerConfig = $cacheFiles->getConfigIni(APPLICATION_PATH . '/configs/' . HOST_MODULE . 'Routes.ini');
     $router->addConfig($routerConfig, "routes");
     $frontController->registerPlugin(new Ml_Plugins_ReservedUsernames());
     Zend_Controller_Action_HelperBroker::getStaticHelper("Redirector")->setPrependBase(false);
     $frontController->setBaseUrl($config['webroot']);
     $loader = new Zend_Loader_PluginLoader();
     $loader->addPrefixPath('Zend_View_Helper', EXTERNAL_LIBRARY_PATH . '/Zend/View/Helper/')->addPrefixPath('Ml_View_Helper', APPLICATION_PATH . '/views/helpers');
     $classFileIncCache = CACHE_PATH . '/PluginDefaultLoaderCache.php';
     if (file_exists($classFileIncCache)) {
         require $classFileIncCache;
     }
     Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewRenderer->initView();
 }
开发者ID:henvic,项目名称:MediaLab,代码行数:30,代码来源:Default.php

示例7: _initHelper

 /**
  * Initialize Init Helper and Layout Plugin
  */
 protected function _initHelper()
 {
     $initHelper = new App_Controller_Plugin_Helper_Init();
     Zend_Controller_Action_HelperBroker::addHelper($initHelper);
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     //$front = Zend_Controller_Front::getInstance();
     //$front->registerPlugin(new App_Controller_Plugin_SelectLayout());
 }
开发者ID:uppaljs,项目名称:pakistan-vlmis-v2,代码行数:11,代码来源:Bootstrap.php

示例8: _initLibrary

 private static function _initLibrary()
 {
     // Register the ZFE controller plugins as helpers
     Zend_Controller_Action_HelperBroker::addPath(ZFE_Environment::getLibraryPath() . '/Controller/Helpers', 'ZFE_Controller_Helper');
     // Load the ZFE_Plugin_ActiveModule plugin
     self::$bootstrap->bootstrap('FrontController');
     $front = self::$bootstrap->getResource('FrontController');
     $front->registerPlugin(new ZFE_Plugin_ActiveModule());
 }
开发者ID:wthielen,项目名称:zf1e,代码行数:9,代码来源:Bootstrap.php

示例9: _initEssentialGarpHelpers

 /**
  * Load essential Garp Helpers
  *
  * @return void
  */
 protected function _initEssentialGarpHelpers()
 {
     // Action helpers
     Zend_Controller_Action_HelperBroker::addPath(GARP_APPLICATION_PATH . '/../library/Garp/Controller/Helper', 'Garp_Controller_Helper');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/../library/App/Controller/Helper', 'App_Controller_Helper');
     // View helpers
     $this->bootstrap('View');
     $this->getResource('View')->addHelperPath(GARP_APPLICATION_PATH . '/modules/g/views/helpers', 'G_View_Helper');
     $this->getResource('View')->addHelperPath(APPLICATION_PATH . '/modules/default/views/helpers', 'App_View_Helper');
 }
开发者ID:grrr-amsterdam,项目名称:garp3,代码行数:15,代码来源:Bootstrap.php

示例10: _initLoadHelper

 public function _initLoadHelper()
 {
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/front/views/helpers');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/danhsach/views/helpers');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/hethong/views/helpers');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/canhan/views/helpers');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/tochuccanbo/views/helpers');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/front/controllers/helpers');
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/helpers', '');
 }
开发者ID:rongandat,项目名称:phanloaicanbo,代码行数:10,代码来源:Bootstrap.php

示例11: _initActionHelpers

 protected function _initActionHelpers()
 {
     // path for module-specific controller helpers
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/modules/auth/controllers/helpers', 'Auth_Controller_Helper_');
     // initialize the event helper with entity manager
     $this->bootstrap('autoload');
     $application = $this->getApplication();
     $application->bootstrap('doctrine');
     if (isset($application->_registry->doctrine->_em)) {
         Auth_Controller_Helper_Event::$defaultEntityManager = $application->_registry->doctrine->_em;
     }
 }
开发者ID:MarS2806,项目名称:Zend-Framework--Doctrine-ORM--PHPUnit--Ant--Jenkins-CI--TDD-,代码行数:12,代码来源:Bootstrap.php

示例12: setupController

 private static function setupController()
 {
     // setup controller
     $frontController = Zend_Controller_Front::getInstance();
     $frontController->throwExceptions(true);
     $frontController->setControllerDirectory('./application/controllers');
     $baseURL = substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '/index.php'));
     $frontController->setbaseUrl($baseURL);
     Zend_Controller_Action_HelperBroker::addPath('helpers', 'MyActionHelpers');
     // run!
     $frontController->dispatch();
 }
开发者ID:Ogwang,项目名称:sainp,代码行数:12,代码来源:Bootstrap.php

示例13: _initView

 protected function _initView()
 {
     // Initialize view
     $view = new Zend_View();
     $view->doctype('XHTML1_STRICT');
     $view->setEncoding('utf-8');
     $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
     // Add it to the ViewRenderer
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     // Return it, so that it can be stored by the bootstrap
     return $view;
 }
开发者ID:neekfenwick,项目名称:dojo-sandbox,代码行数:14,代码来源:Bootstrap.php

示例14: init

 public function init()
 {
     $this->_initDbHelper();
     $this->_initViewRenderer();
     $this->_initResponseContexts();
     // The ACL helper should not be loaded during REST API requests.
     // Otherwise, Omeka may attempt to redirect to users/login when it
     // appears that a controller/action combination is protected.
     $front = Zend_Controller_Front::getInstance();
     if (!$front->getParam('api')) {
         $this->_initAclHelper();
     }
     Zend_Controller_Action_HelperBroker::addPath(APP_DIR . '/controllers/helpers', 'Omeka_Controller_Action_Helper');
 }
开发者ID:lchen01,项目名称:STEdwards,代码行数:14,代码来源:Helpers.php

示例15: _initFrontController

 protected function _initFrontController()
 {
     $frontController = Zend_Controller_Front::getInstance();
     $frontController->setControllerDirectory(APPLICATION_PATH . '/controllers');
     $frontController->setParam('env', APPLICATION_ENV);
     //$frontController->setParam('config',$this->_config);
     $frontController->setRequest(new Zend_Controller_Request_Http());
     // action helpers
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     $actionStack = Zend_Controller_Action_HelperBroker::getStaticHelper('actionStack');
     $actionStack->actionToStack('zoneHeaderOut', 'zone');
     $actionStack->actionToStack('navigation', 'global');
     $actionStack->actionToStack('banner', 'global', '');
     $actionStack->actionToStack('zoneHeaderIn', 'zone');
     //        Zend_Debug::dump($actionStack);
 }
开发者ID:bvincent,项目名称:Zend-Cms,代码行数:16,代码来源:Bootstrap.php


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