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


PHP Zend_Controller_Action_HelperBroker::addPrefix方法代码示例

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


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

示例1: _initRoutes

 protected function _initRoutes()
 {
     $frontController = Zend_Controller_Front::getInstance();
     //get possible languages from config ini
     $availableLangs = $this->getOption('languages');
     //ensure that English language is in the list (required)
     $availableLangs['en_GB'] = 'en';
     //buld regex for route with languages list
     $regex = '(' . implode('|', $availableLangs) . ')';
     $router = $frontController->getRouter();
     $router->removeDefaultRoutes();
     $staticRoute = new Zend_Controller_Router_Route_Static('/', array('module' => 'default'));
     $adminRoute = new Zend_Controller_Router_Route_Static('/admin', array('module' => 'admin'));
     $langRoute = new Zend_Controller_Router_Route('/:lang', array('lang' => ''), array('lang' => $regex));
     $moduleControllerActionRoute = new Zend_Controller_Router_Route(':controller/:action/*', array('controller' => 'index', 'action' => 'index'));
     $langModuleControllerActionRoute = new Zend_Controller_Router_Route(':lang/:module/:controller/:action/*', array('module' => 'default', 'controller' => 'index', 'action' => 'index', 'lang' => ''), array('lang' => $regex, 'module' => '[a-z]+'));
     $router->addRoute('mca', $moduleControllerActionRoute);
     $router->addRoute('lmca', $langModuleControllerActionRoute);
     $router->addRoute('lang', $langRoute);
     $router->addRoute('admin', $adminRoute);
     $router->addRoute('stat', $staticRoute);
     /**
      * register action helpers
      */
     Zend_Controller_Action_HelperBroker::addPrefix('IPMCore_Controller_Action_Helpers_');
     Zend_Controller_Action_HelperBroker::addHelper(new IPMCore_Controller_Action_Helpers_NavigationLoader());
     //this must be here as we pass current language and array of all langs to LangSelector helper
     Zend_Controller_Action_HelperBroker::addHelper(new IPMCore_Controller_Action_Helpers_LanguageLoader($availableLangs));
 }
开发者ID:Tony133,项目名称:zf-web,代码行数:29,代码来源:Bootstrap.php

示例2: _initStatics

 /**
  *
  * Kilka dodatkowych statycznych inicjaliacji
  *
  */
 public function _initStatics()
 {
     $config = $this->getApplication()->getOptions();
     /**
      * Ustawienie konfigu na rejestrze dla kompatybilnosci z poprzednmi rozwiazaniami (resouce plugin dla ACL)
      */
     Zend_Registry::set('config', $config);
     if (isset($config['general']['pluginloader']) and $config['general']['pluginloader']) {
         $classFileIncCache = APPLICATION_PATH . '/../tmp/pluginLoaderCache.php';
         if (file_exists($classFileIncCache)) {
             include_once $classFileIncCache;
         }
         Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     }
     /**
      * Ustawienie fallback tak by klasy bez namespacu tez dzialaly
      */
     Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true)->pushAutoloader(NULL, 'Smarty_');
     /**
      * Domyslny rozmiar strony paginatora
      */
     Zend_Paginator::setDefaultItemCountPerPage($config['paginator']['DefaultItemCountPerPage']);
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('/common/paginator_footer.phtml');
     Zend_Controller_Action_HelperBroker::addPrefix('Base_Controller_Action_Helper');
     Zend_Markup::addRendererPath('Logic', 'Logic/');
     Base_Logic_Abstract::setUsePreexecuteHooks($config['general']['usepreexecutehooks']);
 }
开发者ID:knatorski,项目名称:SMS,代码行数:32,代码来源:Bootstrap.php

示例3: _initViewHelpers

	/**
	 * View Helpers
	 */
	protected function _initViewHelpers()
	{
		$this->bootstrap('layout');
		
		$layout = $this->getResource('layout');
		
		$view = $layout->getView();
		$view->doctype('HTML5');
		$view->headTitle('EvidPac')
			 ->setSeparator(' | ');
		$view->headMeta()->appendHttpEquiv('Content-Type','text/html; charset=UTF-8');
		$view->headMeta()->appendHttpEquiv('Content-Language','ro');
		$view->headLink()->appendStylesheet('/css/blueprint/src/reset.css','screen,projection');
		$view->headLink()->appendStylesheet('/css/blueprint/screen.css', 'screen,projection');
		$view->headLink()->appendStylesheet('/css/blueprint/print.css','print');
		//$view->headLink()->appendStylesheet('/css/blueprint/src/grid.css','screen,projection');
		//$view->headLink()->appendStylesheet('/css/blueprint/src/typography.css','screen,projection');
		$view->headLink()->appendStylesheet('/css/blueprint/plugins/fancy-type/screen.css','screen,projection');
		$view->headLink()->appendStylesheet('/css/dropdown.css');
		$view->headLink()->appendStylesheet('/css/blueprint/ie.css','screen,projection',true);
		$view->headLink()->appendStylesheet('/css/style.css','screen,projection');
		$view->headScript()->appendFile('/js/html5.js','text/javascript',array('conditional' => 'IE'));
		$view->headScript()->appendFile('/js/jquery-1.6.4.min.js','text/javascript');
		$view->headScript()->appendFile('/js/modernizr.2.full.min.js','text/javascript');
		$view->headScript()->appendFile('/js/jQuery.dPassword.js','text/javascript');
		$view->headScript()->appendFile('/js/app.js','text/javascript');
		
		$view->addHelperPath('App/View/Helper', 'App_View_Helper');
		Zend_Controller_Action_HelperBroker::addPrefix('App_View_Helper');		
	}
开发者ID:roxtaz,项目名称:EvidPac,代码行数:33,代码来源:Bootstrap.php

示例4: _out

 /**
  * Na podstawie wybranego helpera wyjścia, przetwarza dane do ostatecznego formatu i wysyła je.
  * @todo metoda do przerobienia - mało elastyczne rozwiązanie.
  * @param Common_Db_Adapter_ListResult $oResult - wyniki/dane do wysłania
  * @param string $helper - helper wyjścia Zend_Controller_Action_Helper_Abstract
  * @param string $sLayout - sciezka do pliku phtml
  */
 public function _out(Common_Db_Adapter_ListResult $oResult)
 {
     Zend_Controller_Action_HelperBroker::addPrefix('Common_Controller_Action_Helper');
     if ($this->_sHelper == null) {
         $this->_sHelper = Common_Response_Grid::OUT_TYPE_JSON;
     }
     if (($sParam = $this->_oRequest->getParam(Common_Response_Grid::REQUEST_OUT_PARAM, null)) && $sParam != null) {
         switch ($sParam) {
             case Common_Response_Grid::OUT_TYPE_JSON:
                 $oHelper = $this->_oController->getHelper($sParam);
                 $oHelper->direct($oResult);
                 break;
             case Common_Response_Grid::OUT_TYPE_CSV:
                 $oHelper = $this->_oController->getHelper($sParam);
                 $oHelper->direct($oResult);
                 break;
             case Common_Response_Grid::OUT_TYPE_HTML:
                 $oHelper = $this->_oController->getHelper($sParam);
                 $oHelper->direct($oResult, $this->_sLayout);
                 break;
             case Common_Response_Grid::OUT_TYPE_PDF:
                 $oHelper = $this->_oController->getHelper($sParam);
                 $oHelper->direct($oResult, $this->_sLayout);
                 break;
             default:
                 throw new Exception('Brak wyjscie -> ' . $sParam);
                 break;
         }
     } else {
         $oHelper = $this->_oController->getHelper($this->_sHelper);
         $oHelper->direct($oResult);
     }
 }
开发者ID:Webowiec,项目名称:zendnote,代码行数:40,代码来源:Grid.php

示例5: init

 public function init()
 {
     $bootstrap = $this->getBootstrap();
     $bootstrap->bootstrap('FrontController');
     $bootstrap->bootstrap('View');
     $bootstrap->bootstrap('Layout');
     $front = $bootstrap->getResource('FronController');
     Zend_Controller_Action_HelperBroker::addPrefix('Bc_Controller_Action_Helper');
     $bootstrap->bootstrap('Doctrine');
     $manager = Zend_Registry::get('db_manager');
     $options = $this->getOptions();
     if (!isset($options[self::OPTION_PLUGINS_PATH])) {
         throw new Exception('Bad Config! pluginsPath shoud be setted');
     }
     $pluginManager = Bc_Application_Plugin_Manager::getInstance();
     $pluginManager->setPluginsPath($options[self::OPTION_PLUGINS_PATH]);
     $pluginManager->initializePlugins();
     if (!isset($options[self::OPTION_THEMES_PATH])) {
         throw new Exception('Bad Config! themesPath shoud be setted');
     }
     $themesManager = Bc_Application_Theme_Manager::getInstance();
     $themesManager->setThemesPath($options[self::OPTION_THEMES_PATH]);
     $themesManager->setView($bootstrap->getResource('View'));
     $themesManager->setActiveThemeName('minimal');
     $themesManager->setLayout($bootstrap->getResource('Layout'));
     $themesManager->initializeTheme();
 }
开发者ID:BGCX262,项目名称:zsoc-svn-to-git,代码行数:27,代码来源:Plugin.php

示例6: _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

示例7: _initActionHelpers

 protected function _initActionHelpers()
 {
     Zend_Controller_Action_HelperBroker::addPrefix('Queroeventos_Controller_Action_Helper_');
     $acl = new Queroeventos_Acl();
     $aclHelper = new Queroeventos_Controller_Action_Helper_Acl(null, array('acl' => $acl));
     Zend_Controller_Action_HelperBroker::addHelper($aclHelper);
 }
开发者ID:neogriffon,项目名称:queroeventos,代码行数:7,代码来源:Bootstrap.php

示例8: init

 public function init()
 {
     parent::init();
     // set language
     try {
         $locale = Zend_Registry::get("Zend_Locale");
         $this->setLanguage($locale->getLanguage());
     } catch (Exception $e) {
         if ($this->_getParam("language")) {
             $this->setLanguage($this->_getParam("language"));
         } else {
             $config = Pimcore_Config::getSystemConfig();
             $this->setLanguage($config->general->language);
         }
     }
     try {
         Zend_Registry::get("pimcore_admin_initialized");
         $this->setUser(Zend_Registry::get("pimcore_admin_user"));
     } catch (Exception $e) {
         // general definitions
         Document::setHideUnpublished(false);
         Object_Abstract::setHideUnpublished(false);
         Object_Abstract::setGetInheritedValues(false);
         Pimcore::setAdminMode();
         // init translations
         self::initTranslations($this);
         // init zend action helpers
         Zend_Controller_Action_HelperBroker::addPrefix('Pimcore_Controller_Action_Helper');
         // authenticate user, first try to authenticate with session information
         $user = Pimcore_Tool_Authentication::authenticateSession();
         if ($user instanceof User) {
             $this->setUser($user);
             if ($this->getUser()->getLanguage()) {
                 $this->setLanguage($this->getUser()->getLanguage());
             }
         } else {
             // try to authenticate with digest, but this is only allowed for WebDAV
             if ($this->_getParam("module") == "admin" && $this->_getParam("controller") == "asset" && $this->_getParam("action") == "webdav") {
                 $user = Pimcore_Tool_Authentication::authenticateDigest();
                 if ($user instanceof User) {
                     $this->setUser($user);
                     return;
                 }
             }
         }
         // send a auth header for the client (is covered by the ajax object in javascript)
         if (!$this->getUser() instanceof User) {
             $this->getResponse()->setHeader("X-Pimcore-Auth", "required");
         }
         // redirect to the login-page if the user isn't authenticated
         if (!$this->getUser() instanceof User && !($this->_getParam("module") == "admin" && $this->_getParam("controller") == "login")) {
             $this->_redirect("/admin/login");
             $this->getResponse()->sendResponse();
             exit;
         }
         Zend_Registry::set("pimcore_admin_user", $this->getUser());
         Zend_Registry::set("pimcore_admin_initialized", true);
     }
 }
开发者ID:ngocanh,项目名称:pimcore,代码行数:59,代码来源:Admin.php

示例9: _initPlugins

 protected function _initPlugins()
 {
     // Plug-ins
     $front = $this->bootstrap('FrontController')->getResource('FrontController');
     $front->registerPlugin(new Rabotal_Controller_Plugin_Acl());
     $front->registerPlugin(new Rabotal_Controller_Plugin_FillHead());
     // Helpers
     Zend_Controller_Action_HelperBroker::addPrefix('Rabotal_Controller_Action_Helpers');
     return NULL;
 }
开发者ID:romikring,项目名称:rcalex,代码行数:10,代码来源:Bootstrap.php

示例10: _initActionHelpers

 protected function _initActionHelpers()
 {
     if ('development' == APPLICATION_ENV) {
         // Place this in your bootstrap file before dispatching your front controller
         $writer = new Zend_Log_Writer_Firebug();
         $logger = new Zend_Log($writer);
         Zend_Registry::set("logger", $logger);
         Zend_Controller_Action_HelperBroker::addPrefix("My_Controller_Action_Helper");
     }
 }
开发者ID:tests1,项目名称:zendcasts,代码行数:10,代码来源:Bootstrap.php

示例11: _initHelpers

 /**
  * Set up our Controller and View helpers
  * @return Zend_View
  */
 protected function _initHelpers()
 {
     // Controller Action Helper
     Zend_Controller_Action_HelperBroker::addPrefix("App_Controller_Helper");
     // View Helper
     $this->bootstrap('view');
     $view = $this->getResource('view');
     $view->doctype('XHTML1_STRICT');
     $view->addHelperPath(APPLICATION_PATH . "/../library/App/View/Helper/", "App_View_Helper");
     return $view;
 }
开发者ID:samuel-mccallum,项目名称:Task-Lab,代码行数:15,代码来源:Bootstrap.php

示例12: _initExtensionManager

 /**
  * Initializes the the extension manager which in turn scans
  * for components, modules, plugins and wrapper and registers them.
  *
  * @since 0.9.5
  */
 public function _initExtensionManager()
 {
     // require Front controller
     $this->bootstrap('frontController');
     $frontController = $this->getResource('frontController');
     // require Config
     $this->bootstrap('Config');
     $config = $this->getResource('Config');
     //NOTICE: i swtiched loading of erfurt and session
     //because serialized erfurt objects in the session need constants defined in erfurt
     //is this ok?
     Erfurt_Wrapper_Registry::reset();
     // require Erfurt
     $this->bootstrap('Erfurt');
     // apply session configuration settings
     if (isset($config->session)) {
         $this->applySessionConfig($config->session);
     }
     // require Session
     $this->bootstrap('Session');
     // require Dispatcher
     $this->bootstrap('Dispatcher');
     $dispatcher = $this->getResource('Dispatcher');
     // require OntoWiki
     $this->bootstrap('OntoWiki');
     $ontoWiki = $this->getResource('OntoWiki');
     // require Translate
     $this->bootstrap('Translate');
     $translate = $this->getResource('Translate');
     // require View
     $this->bootstrap('View');
     $view = $this->getResource('View');
     // make sure router is bootstrapped
     $this->bootstrap('Router');
     // set view
     $ontoWiki->view = $view;
     $extensionPath = ONTOWIKI_ROOT . $config->extensions->base;
     $extensionPathBase = $config->staticUrlBase . $config->extensions->base;
     $extensionManager = new OntoWiki_Extension_Manager($extensionPath);
     $extensionManager->setTranslate($translate)->setComponentUrlBase($extensionPathBase);
     // register component controller directories
     foreach ($extensionManager->getComponents() as $extensionName => $extensionConfig) {
         $frontController->addControllerDirectory($extensionConfig->path, '_component_' . $extensionName);
     }
     // make extension manager available to dispatcher
     $dispatcher = $frontController->getDispatcher();
     $dispatcher->setExtensionManager($extensionManager);
     // keep extension manager in OntoWiki
     $ontoWiki->extensionManager = $extensionManager;
     // actionhelper
     Zend_Controller_Action_HelperBroker::addPrefix('OntoWiki_Controller_ActionHelper_');
     Zend_Controller_Action_HelperBroker::addHelper(new OntoWiki_Controller_ActionHelper_List());
     return $extensionManager;
 }
开发者ID:cfrancois7,项目名称:aksw.org,代码行数:60,代码来源:Bootstrap.php

示例13: init

 public function init()
 {
     parent::init();
     $maxExecutionTime = 300;
     @ini_set("max_execution_time", $maxExecutionTime);
     set_time_limit($maxExecutionTime);
     Zend_Controller_Action_HelperBroker::addPrefix('Pimcore_Controller_Action_Helper');
     if (is_file(PIMCORE_CONFIGURATION_SYSTEM)) {
         $this->_redirect("/admin");
     }
 }
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:11,代码来源:IndexController.php

示例14: init

 public function init()
 {
     parent::init();
     \Zend_Controller_Action_HelperBroker::addPrefix('Member_Controller_Action_Helper');
     // attach default listeners
     \Pimcore::getEventManager()->attach('member.register.validate', ['\\Member\\Listener\\Register', 'validate'], 0);
     \Pimcore::getEventManager()->attach('member.password.reset', ['\\Member\\Listener\\Password', 'reset'], 0);
     if (Config::get('actions')->postRegister) {
         \Pimcore::getEventManager()->attach('member.register.post', ['\\Member\\Listener\\Register', Config::get('actions')->postRegister], 0);
     }
 }
开发者ID:Pegasuz,项目名称:member,代码行数:11,代码来源:Plugin.php

示例15: _initController

 protected function _initController()
 {
     $this->bootstrap('FrontController');
     $controller = $this->getResource('FrontController');
     $modules = $controller->getControllerDirectory();
     $controller->setParam('prefixDefaultModule', true);
     //Setup the Custom Helpers
     Zend_Controller_Action_HelperBroker::addPrefix('Ht_Helper');
     //$controller->addModuleDirectory(APPLICATION_PATH . '/modules');
     //Zend_Loader::loadClass("Ht_Modules_Loader");
     //$controller->registerPlugin(new Ht_Modules_Loader($modules));
     return $controller;
 }
开发者ID:kangza,项目名称:hagtag,代码行数:13,代码来源:Bootstrap.php


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