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

PHP Zend_Loader_PluginLoader类代码示例

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

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



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

示例1: 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


示例2: _loadAclClasses

 /**
  * Load ACL classes from Brightfame Framework
  *
  * @return void
  */
 protected function _loadAclClasses()
 {
     $loader = new Zend_Loader_PluginLoader(array('Brightfame_Acl_Role' => APPLICATION_PATH . '/../library/Brightfame/Acl/Role/'));
     foreach (array('Guest', 'Member', 'Administrator') as $role) {
         $loader->load($role);
     }
 }
开发者ID:robsta,项目名称:brightfamecms,代码行数:12,代码来源:Auth.php


示例3: getLoader

 public function getLoader()
 {
     if ($this->_loader == null) {
         $this->_loader = new Zend_Loader_PluginLoader();
         $this->_loader->addPrefixPath('Bc_Annotations', 'Bc/Annotations');
     }
     return $this->_loader;
 }
开发者ID:BGCX262,项目名称:zsoc-svn-to-git,代码行数:8,代码来源:Reader.php


示例4: _initPlugins

 /**
  * Load system module plugins
  */
 public function _initPlugins()
 {
     $loader = new Zend_Loader_PluginLoader();
     $loader->addPrefixPath('System_Plugin', 'application/modules/system/plugins/');
     $this->bootstrap('frontController');
     $front = $this->getResource('frontController');
     $front->registerPlugin(new System_Plugin_Router());
 }
开发者ID:rogercastaneda,项目名称:owlsys,代码行数:11,代码来源:Bootstrap.php


示例5: getPluginLoader

 /**
  * Get plugin loader
  * 
  * @return Zend_Loader_PluginLoader
  */
 public function getPluginLoader()
 {
     if (null === $this->_loader) {
         $this->_loader = new Zend_Loader_PluginLoader();
         $this->_loader->addPrefixPath('Model_Table', dirname(__FILE__) . '/Table/');
     }
     return $this->_loader;
 }
开发者ID:jakemcgraw,项目名称:locamore,代码行数:13,代码来源:AModel.php


示例6: getPluginLoader

 /**
  * Get plugin loader
  *
  * @return Zend_Loader_PluginLoader_Interface
  */
 public static function getPluginLoader()
 {
     if (self::$pluginLoader == null) {
         $pluginLoader = new Zend_Loader_PluginLoader();
         $pluginLoader->addPrefixPath(__CLASS__, 'System/Serializer/Dom');
         self::$pluginLoader = $pluginLoader;
     }
     return self::$pluginLoader;
 }
开发者ID:kandy,项目名称:system,代码行数:14,代码来源:Dom.php


示例7: getPluginLoader

 /**
  * Get plugin loader
  *
  * @return Zend_Loader_PluginLoader_Interface
  */
 public static function getPluginLoader()
 {
     if (self::$pluginLoader == null) {
         $pluginLoader = new Zend_Loader_PluginLoader();
         $pluginLoader->addPrefixPath(str_replace('Abstract', '', __CLASS__), dirname(__FILE__));
         self::$pluginLoader = $pluginLoader;
     }
     return self::$pluginLoader;
 }
开发者ID:kandy,项目名称:system,代码行数:14,代码来源:Abstract.php


示例8: getPluginLoader

 /**
  * Get plugin loader
  *
  * @return Zend_Loader_PluginLoader_Interface
  */
 public static function getPluginLoader()
 {
     if (self::$pluginLoader == null) {
         $pluginLoader = new Zend_Loader_PluginLoader();
         $pluginLoader->addPrefixPath('System_Acl_Loader', 'System/Acl/Loader');
         self::$pluginLoader = $pluginLoader;
     }
     return self::$pluginLoader;
 }
开发者ID:kandy,项目名称:system,代码行数:14,代码来源:Loader.php


示例9: _initPlugins

 public function _initPlugins()
 {
     $this->bootstrap('frontController');
     $pluginsLoader = new Zend_Loader_PluginLoader();
     $pluginsLoader->addPrefixPath("Plugin", APPLICATION_PATH . '/plugins');
     $pluginsLoader->load("PageModule");
     if ($pluginsLoader->isLoaded('PageModule')) {
         Zend_Controller_Front::getInstance()->registerPlugin(new Plugin_PageModule());
     }
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:10,代码来源:Bootstrap.php


示例10: _initPlugins

 protected function _initPlugins()
 {
     $this->bootstrap('frontController');
     $pluginsLoader = new Zend_Loader_PluginLoader();
     $pluginsLoader->addPrefixPath("Plugin", APPLICATION_PATH . '/plugins');
     $front = Zend_Controller_Front::getInstance();
     $pluginsLoader->load("Redirect");
     if ($pluginsLoader->isLoaded("Redirect")) {
         $front->registerPlugin(new Plugin_Redirect());
     }
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:11,代码来源:Bootstrap.php


示例11: _loadContexts

 /**
  * _loadContexts() - statically find and load the context files
  *
  */
 protected static function _loadContexts()
 {
     $pluginLoader = new Zend_Loader_PluginLoader(array('Zend_Tool_Provider_ZfProject_ProjectContext_' => dirname(__FILE__) . '/ProjectContext/'));
     $classes = $pluginLoader->loadAll();
     foreach ($classes as $class) {
         $reflectionClass = new ReflectionClass($class);
         if ($reflectionClass->isInstantiable() && $reflectionClass->isSubclassOf('Zend_Tool_Provider_ZfProject_ProjectContext_ProjectContextAbstract')) {
             $context = $reflectionClass->newInstance();
             self::$_contexts[$context->getContextName()] = $context;
         }
     }
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:16,代码来源:ProjectProfile.php


示例12: __construct

 /**
  * 构造函数
  * 
  * @param string $backend
  * @param string $frontend
  * @throws ZtChart_Model_Assemble_Exception
  */
 public function __construct($backend, $frontend = 'PHPArray')
 {
     $loader = new Zend_Loader_PluginLoader(array('ZtChart_Model_Assemble_Backend_' => realpath(__DIR__ . '/Assemble/Backend'), 'ZtChart_Model_Assemble_Frontend_' => realpath(__DIR__ . '/Assemble/Frontend')));
     $backendName = is_array($backend) ? key($backend) : $backend;
     if (false === ($backendClass = $loader->load($backendName, false))) {
         throw new ZtChart_Model_Assemble_Exception("Specified backend class '{$backendName}' could not be found");
     }
     $this->_backend = new $backendClass($backend);
     $frontendName = is_array($frontend) ? key($frontend) : $frontend;
     if (false === ($frontendClass = $loader->load($frontendName, false))) {
         throw new ZtChart_Model_Assemble_Exception("Specified frontend class '{$frontendName}' could not be found");
     }
     $this->_frontend = new $frontendClass($frontend);
 }
开发者ID:starflash,项目名称:ZtChart-ZF1-Example,代码行数:21,代码来源:Assemble.php


示例13: init

 /**
  * To init the view
  *
  * @return Zend_View $view
  */
 public function init()
 {
     $frontendOptions = array('automatic_serialization' => true, 'lifetime' => 86400);
     $backendOptions = array('cache_dir' => PROJECT_ROOT . '/repository/cache/');
     if ('development' == APPLICATION_ENV) {
         $frontendOptions['caching'] = false;
         //关闭缓存
     } else {
         $classFileIncCache = $backendOptions['cache_dir'] . 'pluginLoaderCache.php';
         if (file_exists($classFileIncCache)) {
             include_once $classFileIncCache;
         }
         Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     }
     $this->_cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
     Zend_Db_Table_Abstract::setDefaultMetadataCache($this->_cache);
     //缓存Zend_Db_Table元数据
     Zend_Date::setOptions(array('cache' => $this->_cache));
     //缓存Zend_Date
     Zend_Translate::setCache($this->_cache);
     //缓存Zend_Translate
     Zend_Registry::set('cache', $this->_cache);
     // Return it, so that it can be stored by the bootstrap
     return $this->_cache;
 }
开发者ID:BGCX262,项目名称:zyk-svn-to-git,代码行数:30,代码来源:Cache.php


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


示例15: getTableLoader

 /**
  * Returns the table loader for this instance.
  * @return Zend_Loader_PluginLoader
  */
 protected function getTableLoader()
 {
     if (!isset($this->_tableLoader)) {
         $this->_tableLoader = new Zend_Loader_PluginLoader();
         $this->_tableLoader->addPrefixPath('Hmd_Db_Model_Table', 'Hmd/Db/Model/Table');
     }
     return $this->_tableLoader;
 }
开发者ID:nextdude,项目名称:howmanydead.org,代码行数:12,代码来源:Model.php


示例16: setIncludeFileCache

 /**
  * Set include file cache
  *
  * @return  void
  */
 public function setIncludeFileCache()
 {
     if ($options = $this->getOptions()) {
         if (is_string($options) && file_exists($options)) {
             include_once $options;
         }
         Zend_Loader_PluginLoader::setIncludeFileCache($options);
     }
 }
开发者ID:rockett,项目名称:parables,代码行数:14,代码来源:Includefilecache.php


示例17: _initPluginCache

 /**
  * Метод инициализирует кеширование загрузки плагинов приложения.
  *
  * @param string $path
  */
 protected function _initPluginCache($path)
 {
     if (file_exists($path) && is_readable($path)) {
         include $path;
     }
     if (is_writable($path) || is_writable(dirname($path))) {
         Zend_Loader_PluginLoader::setIncludeFileCache($path);
     }
 }
开发者ID:rusnak,项目名称:Ext,代码行数:14,代码来源:Application.php


示例18: _initFileInlcudeCache

 /**
  * Setup include file cache to increase performance
  *
  * @return void
  * @author Jim Li
  */
 protected function _initFileInlcudeCache()
 {
     $classFileIncCacheOptions = $this->getOption('cache');
     $classFileIncCache = $classFileIncCacheOptions['classFileIncludeCache'];
     if (file_exists($classFileIncCache)) {
         include_once $classFileIncCache;
     }
     Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
 }
开发者ID:joericochuyt,项目名称:zf-with-doctrine,代码行数:15,代码来源:Bootstrap.php


示例19: _initCachePlugin

 protected function _initCachePlugin()
 {
     //Tunning do Zend
     $pathIncCache = APPLICATION_PATH_CACHE . '/cachePlugin';
     $classFileIncCache = $pathIncCache . '/pluginLoaderCache.php';
     if (file_exists($classFileIncCache)) {
         include_once $classFileIncCache;
     }
     Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
 }
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:10,代码来源:Bootstrap.php


示例20: __construct

 /**
  * 构造函数
  * 
  * @param string $daemon
  * @param array|Zend_Config $config
  * @param ZtChart_Model_Monitor_Console $console
  */
 public function __construct($daemon, $config = array(), ZtChart_Model_Monitor_Console $console = null)
 {
     if ($config instanceof Zend_Config) {
         $config = $config->toArray();
     }
     if (null === $console) {
         $console = ZtChart_Model_Monitor_Console::getInstance();
     }
     $loader = new Zend_Loader_PluginLoader(array('ZtChart_Model_Monitor_Daemon' => realpath(__DIR__ . '/Monitor/Daemon')));
     if (false === ($daemonClass = $loader->load($daemon, false))) {
         throw new ZtChart_Model_Monitor_Exception("Specified daemon class '{$daemon}' could not be found.");
     } else {
         if (!is_subclass_of($daemonClass, 'ZtChart_Model_Monitor_Daemon_Abstract')) {
             throw new ZtChart_Model_Monitor_Exception("Specified daemon class '{$daemon}' is illegal.");
         } else {
             $this->_daemon = new $daemonClass($console, $config);
         }
     }
 }
开发者ID:starflash,项目名称:ZtChart-ZF1-Example,代码行数:26,代码来源:Monitor.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Locale类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Loader_Autoloader_Resource类代码示例发布时间: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