Laravoole\Base::prepareKernel PHP Méthode

prepareKernel() public méthode

public prepareKernel ( )
    public function prepareKernel()
    {
        // unregister temporary autoloader
        foreach (spl_autoload_functions() as $function) {
            spl_autoload_unregister($function);
        }
        require $this->root_dir . '/bootstrap/autoload.php';
        $this->app = $this->getApp();
        $this->kernel = $this->app->make(\Illuminate\Contracts\Http\Kernel::class);
        // from \Illuminate\Contracts\Console\Kernel
        // do not using Http\Kernel here, because needs SetRequestForConsole
        $this->app->bootstrapWith(['Illuminate\\Foundation\\Bootstrap\\DetectEnvironment', 'Illuminate\\Foundation\\Bootstrap\\LoadConfiguration', 'Illuminate\\Foundation\\Bootstrap\\ConfigureLogging', 'Illuminate\\Foundation\\Bootstrap\\HandleExceptions', 'Illuminate\\Foundation\\Bootstrap\\RegisterFacades', 'Illuminate\\Foundation\\Bootstrap\\SetRequestForConsole', 'Illuminate\\Foundation\\Bootstrap\\RegisterProviders', 'Illuminate\\Foundation\\Bootstrap\\BootProviders']);
        chdir(public_path());
    }

Usage Example

Exemple #1
0
 public function onWorkerStart($serv, $worker_id)
 {
     parent::prepareKernel();
     $server = $this->server;
     $this->app->singleton('laravoole.server', function ($app) use($server) {
         return $server;
     });
 }
All Usage Examples Of Laravoole\Base::prepareKernel