當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。