コード例 #1
0
ファイル: Application.php プロジェクト: wandu/framework
 /**
  * @param \Wandu\Foundation\Contracts\KernelInterface $kernel
  */
 public function __construct(KernelInterface $kernel)
 {
     parent::__construct();
     $this->instance(KernelInterface::class, $this->kernel = $kernel);
     $this->alias('kernel', KernelInterface::class);
     $this->setAsGlobal();
 }
コード例 #2
0
ファイル: Application.php プロジェクト: Festiv/Festiv
 /**
  * @param \Festiv\Foundation\KernelInterface $kernel
  * @param array $config
  */
 public function __construct(KernelInterface $kernel = null, array $config = [])
 {
     parent::__construct();
     if (!isset($kernel)) {
         $kernel = new NullKernel();
     }
     $this->instance(KernelInterface::class, $this->kernel = $kernel);
     $this->instance('config', new DotConfig($config));
     // Load Kernel Providers
     $this->kernel->registered($this);
 }