Пример #1
0
 /**
  * 加载配置
  *
  * @param string $file
  * @return void
  */
 public function required($file)
 {
     $md5 = md5($file);
     if (isset($this->required[$md5])) {
         return $this->required[$md5];
     }
     $this->required[$md5] = $this->files->getRequire($file);
 }
Пример #2
0
 /**
  * 给定的控制器是否存在
  *
  * @param string $appName
  * @param string $controllerName
  * @return bool
  */
 private function isController($controllerName)
 {
     return $this->files->isFile($this->app['path.app'] . '/' . lcfirst($this->app->getAppName()) . '/controllers/' . ucfirst($controllerName) . self::CONTROLLER_PREFIX . '.php');
 }
Пример #3
0
 /**
  * 指定的配置文件是否存在
  *
  * @param string $group
  * @param string $namespace
  * @return bool
  */
 public function exists($group, $namespace = null)
 {
     $path = $this->getPath($namespace);
     $file = "{$path}/{$group}.php";
     return $this->files->exists($file);
 }