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


PHP Zend_Loader_PluginLoader::_includeFileCache方法代码示例

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


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

示例1: setIncludeFileCache

 /**
  * Set path to class file cache
  *
  * Specify a path to a file that will add include_once statements for each
  * plugin class loaded. This is an opt-in feature for performance purposes.
  *
  * @param  string $file
  * @return void
  * @throws Zend_Loader_PluginLoader_Exception if file is not writeable or path does not exist
  */
 public static function setIncludeFileCache($file)
 {
     if (null === $file) {
         self::$_includeFileCache = null;
         return;
     }
     if (!file_exists($file) && !file_exists(dirname($file))) {
         require_once 'Zend/Loader/PluginLoader/Exception.php';
         throw new Zend_Loader_PluginLoader_Exception('Specified file does not exist and/or directory does not exist (' . $file . ')');
     }
     if (file_exists($file) && !is_writable($file)) {
         require_once 'Zend/Loader/PluginLoader/Exception.php';
         throw new Zend_Loader_PluginLoader_Exception('Specified file is not writeable (' . $file . ')');
     }
     if (!file_exists($file) && file_exists(dirname($file)) && !is_writable(dirname($file))) {
         require_once 'Zend/Loader/PluginLoader/Exception.php';
         throw new Zend_Loader_PluginLoader_Exception('Specified file is not writeable (' . $file . ')');
     }
     self::$_includeFileCache = $file;
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:30,代码来源:PluginLoader.php

示例2: setIncludeFileCache

 /**
  * Set path to class file cache
  *
  * Specify a path to a file that will add include_once statements for each
  * plugin class loaded. This is an opt-in feature for performance purposes.
  *
  * @param  string $file
  * @return void
  * @throws Zend_Loader_PluginLoader_Exception if file is not writeable or path does not exist
  */
 public static function setIncludeFileCache($file)
 {
     if (!empty(self::$_includeFileCacheHandler)) {
         flock(self::$_includeFileCacheHandler, LOCK_UN);
         fclose(self::$_includeFileCacheHandler);
     }
     self::$_includeFileCacheHandler = null;
     if (null === $file) {
         self::$_includeFileCache = null;
         return;
     }
     if (!file_exists($file) && !file_exists(dirname($file))) {
         throw new Zend_Loader_PluginLoader_Exception('Specified file does not exist and/or directory does not exist (' . $file . ')');
     }
     if (file_exists($file) && !is_writable($file)) {
         throw new Zend_Loader_PluginLoader_Exception('Specified file is not writeable (' . $file . ')');
     }
     if (!file_exists($file) && file_exists(dirname($file)) && !is_writable(dirname($file))) {
         throw new Zend_Loader_PluginLoader_Exception('Specified file is not writeable (' . $file . ')');
     }
     self::$_includeFileCache = $file;
 }
开发者ID:NerdGZ,项目名称:icingaweb2,代码行数:32,代码来源:PluginLoader.php


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