예제 #1
0
파일: Helper.php 프로젝트: leon723/chestnut
 function app($component = null, $parameters = [])
 {
     if (is_null($component)) {
         return Container::getInstance();
     }
     return Container::getInstance()->make($component, $parameters);
 }
예제 #2
0
 public function __construct($basePath = null)
 {
     parent::__construct();
     static::setInstance($this);
     $this->instance('app', $this);
     $this->initConfig($basePath);
     $this->registerBaseComponent();
     $this->bootstrap();
 }