コード例 #1
0
ファイル: App.php プロジェクト: Vighnesh123/book-a-bus
 /**
  * Maps the $name to the $file.
  *
  * @param string $file full path to file
  * @param string $name unique name for this map
  * @param string $plugin camelized if object is from a plugin, the name of the plugin
  * @return void
  */
 protected static function _map($file, $name, $plugin = null)
 {
     $key = $name;
     if ($plugin) {
         $key = 'plugin.' . $name;
     }
     if ($plugin && empty(self::$_map[$name])) {
         self::$_map[$key] = $file;
     }
     if (!$plugin && empty(self::$_map['plugin.' . $name])) {
         self::$_map[$key] = $file;
     }
     if (!self::$bootstrapping) {
         self::$_cacheChange = true;
     }
 }
コード例 #2
0
 /**
  * Maps the $name to the $file.
  *
  * @param string $file full path to file
  * @param string $name unique name for this map
  * @param string $plugin camelized if object is from a plugin, the name of the plugin
  * @return void
  */
 protected static function _map($file, $name, $plugin = null)
 {
     if ($plugin) {
         self::$_map['Plugin'][$plugin][$name] = $file;
     } else {
         self::$_map[$name] = $file;
     }
     if (!self::$bootstrapping) {
         self::$_cacheChange = true;
     }
 }