コード例 #1
0
 /**
  * Boot a fresh copy of the application configuration.
  *
  * @return mixed
  */
 protected function getFreshConfiguration()
 {
     $application = new Application($this->laravel->basePath());
     $application->singleton(HttpKernelContract::class, Kernel::class);
     $application->singleton(ConsoleKernelContract::class, ConsoleKernel::class);
     $application->singleton(ExceptionHandler::class, Handler::class);
     $application->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap();
     return $application['config']->all();
 }
コード例 #2
0
ファイル: Server.php プロジェクト: darrengopower/framework
 /**
  * @return void
  */
 public function console()
 {
     $this->application->singleton(ConsoleKernelContract::class, ConsoleKernel::class);
     $this->application->singleton(ExceptionHandler::class, Handler::class);
     $kernel = $this->application->make(ConsoleKernelContract::class);
     $status = $kernel->handle($input = new ArgvInput(), new ConsoleOutput());
     $kernel->terminate($input, $status);
     exit($status);
 }
コード例 #3
0
ファイル: bootstrap.php プロジェクト: darrengopower/framework
<?php

/**
 * This file is part of Notadd.
 * @author TwilRoad <*****@*****.**>
 * @copyright (c) 2015, iBenchu.org
 * @datetime 2015-10-16 21:38
 */
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
use Illuminate\Contracts\Http\Kernel as HttpKernelContract;
use Notadd\Foundation\Application;
use Notadd\Foundation\Console\Kernel as ConsoleKernel;
use Notadd\Foundation\Http\Kernel as HttpKernel;
use Notadd\Foundation\Install\Kernel as InstallKernel;
use Notadd\Foundation\Exceptions\Handler;
define('NOTADD_START', microtime(true));
require __DIR__ . '/vendor/autoload.php';
$app = new Application(realpath(__DIR__));
if ($app->isInstalled()) {
    $app->singleton(HttpKernelContract::class, HttpKernel::class);
    $app->singleton(ExceptionHandler::class, Handler::class);
} else {
    $app->singleton(HttpKernelContract::class, InstallKernel::class);
    $app->singleton(ExceptionHandler::class, Handler::class);
}
return $app;