/** * @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(); }
/** * @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); }