예제 #1
0
 /**
  * Application的构造函数
  *
  * @param string $basePath 应用目录
  * @param array  $args     传入参数
  */
 public function __construct($basePath, $args = [])
 {
     //根据文件名定义服务名
     \define('DI_SERVER_NAME', current(explode('.php', $args[0])));
     parent::__construct();
     $this->setFrameworkPath(__DIR__);
     if ($basePath) {
         $this->setBasePath($basePath);
     }
     return $this->handleArgs($args);
 }
예제 #2
0
 /**
  * @return FacadeService
  */
 protected static function getFacadeRoot()
 {
     return Container::Instance()->GetInstance(Static::getFacadeAccessor());
 }