Esempio n. 1
0
 /**
  * Append an include_once statement to the class file cache
  *
  * @param  string $incFile
  * @return void
  */
 protected static function _appendIncFile($incFile)
 {
     if (!isset(self::$_includeFileCacheHandler)) {
         self::$_includeFileCacheHandler = fopen(self::$_includeFileCache, 'ab');
         if (!flock(self::$_includeFileCacheHandler, LOCK_EX | LOCK_NB, $wouldBlock) || $wouldBlock) {
             self::$_includeFileCacheHandler = false;
         }
     }
     if (false !== self::$_includeFileCacheHandler) {
         $line = "<?php include_once '{$incFile}'?>\n";
         fwrite(self::$_includeFileCacheHandler, $line, strlen($line));
     }
 }