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


PHP Zend_Loader_PluginLoader::setIncludeFileCache方法代码示例

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


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

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

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

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

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

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

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

示例7: X_initPluginLoaderCache

 /**
  * Configure the pluginloader cache
  */
 protected function X_initPluginLoaderCache()
 {
     if ('production' == $this->getEnvironment()) {
         $classFileIncCache = APPLICATION_PATH . '/../data/cache/pluginLoaderCache.php';
         if (file_exists($classFileIncCache)) {
             include_once $classFileIncCache;
         }
         Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     }
 }
开发者ID:shadobladez,项目名称:erp2,代码行数:13,代码来源:Bootstrap.php

示例8: init

 public function init()
 {
     if (!RFLib_Core::getIsDeveloperMode()) {
         $classFileCache = VAR_PATH . DS . self::CACHE_FOLDER . DS . self::CACHE_FILE;
         if (file_exists($classFileCache)) {
             include_once $classFileCache;
         }
         Zend_Loader_PluginLoader::setIncludeFileCache($classFileCache);
     }
 }
开发者ID:rickyfeng,项目名称:wenda,代码行数:10,代码来源:LoaderCache.php

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

示例10: _initPluginCache

 protected function _initPluginCache()
 {
     if ($this->getEnvironment() != 'production') {
         return;
     }
     $file = APPLICATION_PATH . '/../data/plugin-cache.php';
     if (file_exists($file)) {
         include_once $file;
     }
     Zend_Loader_PluginLoader::setIncludeFileCache($file);
 }
开发者ID:kminkov,项目名称:Blog,代码行数:11,代码来源:Bootstrap.php

示例11: _initAutoLoader

 protected function _initAutoLoader()
 {
     $classFileIncCache = APPLICATION_PATH . '/../datas/cache/pluginLoaderCache.php';
     if (file_exists($classFileIncCache)) {
         include_once $classFileIncCache;
     }
     if ($this->_config->enablePluginLoaderCache) {
         Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     }
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $autoloader->registerNamespace('Enterprise_');
 }
开发者ID:AlexChien,项目名称:bbcoach,代码行数:12,代码来源:Bootstrap.php

示例12: _initAppCache

 /**
  * Setup our cache
  */
 protected function _initAppCache()
 {
     $this->bootstrap('cachemanager');
     $metaCache = $this->getResource('cachemanager')->getCache('metadata');
     $dateCache = $this->getResource('cachemanager')->getCache('date');
     Zend_Db_Table_Abstract::setDefaultMetadataCache($metaCache);
     Zend_Date::setOptions(array('cache' => $dateCache));
     if ('production' === $this->getEnvironment()) {
         $classFileIncCache = APPLICATION_PATH . '/tmp/pluginLoaderCache.php';
         if (file_exists($classFileIncCache)) {
             include_once $classFileIncCache;
         }
         Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     }
 }
开发者ID:rantoine,项目名称:AdvisorIllustrator,代码行数:18,代码来源:Bootstrap.php

示例13: _initCache

 public function _initCache()
 {
     $this->bootstrap('cachemanager');
     $options = $this->getOption('resources');
     if (!$options['cachemanager']['default']['active']) {
         return;
     }
     $cache = $this->getPluginResource('cachemanager')->getCacheManager()->getCache('default');
     $classFileIncCache = APPLICATION_PATH . '/../data/cache/pluginLoaderCache.php';
     if (file_exists($classFileIncCache)) {
         include_once $classFileIncCache;
     }
     Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
     Zend_Registry::set('cache', $cache);
 }
开发者ID:abdala,项目名称:la,代码行数:16,代码来源:Bootstrap.php

示例14: main

function main()
{
    $key = 'app_performance';
    $config = apc_fetch($key, $success);
    if (!$success) {
        $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
        $config = $config->toArray();
        apc_store($key, $config);
    }
    $cachefile = APPLICATION_PATH . '/../data/cache/plugins.php';
    if (file_exists($cachefile)) {
        include_once $cachefile;
    }
    Zend_Loader_PluginLoader::setIncludeFileCache($cachefile);
    // Create application, bootstrap, and run
    $application = new Zend_Application(APPLICATION_ENV, $config);
    $application->bootstrap()->run();
}
开发者ID:hirak,项目名称:performance,代码行数:18,代码来源:index.php

示例15: _initCache

 /**
  * Set caching
  *
  * @return void
  */
 public function _initCache()
 {
     if (!Zend_Registry::isRegistered('cachemanager')) {
         return false;
     }
     $cache = HCMS_Cache::getInstance()->getCoreCache();
     //set cache for table metadata
     Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
     //set cache for locale
     Zend_Locale::setCache($cache);
     //set cache for translate
     Zend_Translate::setCache($cache);
     //plugin loader cache
     $classFileIncCache = APPLICATION_PATH . '/../cache/file/pluginLoaderCache.php';
     if (file_exists($classFileIncCache)) {
         include_once $classFileIncCache;
     }
     Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
 }
开发者ID:bokultis,项目名称:kardiomedika,代码行数:24,代码来源:Bootstrap.php


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