/** * [__construct description] * @param Application $app [description] * @param Router $router [description] */ public function __construct(Application $app, Router $router) { $this->routeMiddleware = Generate::routeMiddleware($this->routeMiddleware); $this->middleware = Generate::middleware([], $this->middleware); $this->middlewareGroups = Generate::middlewareGroups($this->middlewareGroups); parent::__construct($app, $router); }
/** * We need to replace the ConfigureLogging bootstrappers to use the custom * one. We’ll do this by overriding their respective constructors and * doing an array_walk to the bootstrappers property. * * @param Application $app * @param Router $router */ public function __construct(Application $app, Router $router) { parent::__construct($app, $router); array_walk($this->bootstrappers, function (&$bootstrapper) { if ($bootstrapper === 'Illuminate\\Foundation\\Bootstrap\\ConfigureLogging') { $bootstrapper = 'Bootstrap\\ConfigureLogging'; } }); }
/** * Create a new Kernel instance. * * @param Application $app * @param Router $router */ public function __construct(Application $app, Router $router) { $this->defineLocale(); $config = (require base_path('config/streams.php')); $this->middleware = array_get($config, 'middleware') ?: $this->middleware; $this->routeMiddleware = array_get($config, 'route_middleware') ?: $this->routeMiddleware; $this->middlewareGroups = array_get($config, 'middleware_groups') ?: $this->middlewareGroups; $this->middlewarePriority = array_get($config, 'middleware_priority') ?: $this->middlewarePriority; parent::__construct($app, $router); }
public function __construct(Application $app, Router $router) { parent::__construct($app, $router); // TODO: Change the autogenerated stub array_walk($this->bootstrappers, function (&$bootstrapper) { if ($bootstrapper === 'Illuminate\\Foundation\\Bootstrap\\ConfigureLogging') { $bootstrapper = 'App\\Services\\ConfigureLogging'; } }); }
/** * Get the route dispatcher callback. * * @return \Closure */ protected function dispatchToRouter() { // Reconstruct the kernel and reset the class' router to use our new // extended router which got instantiated and bound into the IoC after // the default router got set up and bound. This might look kinda odd, // but poses no direct consequences. parent::__construct($this->app, $this->app->make('router')); // Continue as normal return parent::dispatchToRouter(); }
public function __construct(Application $app, Router $router) { $this->defineLocale(); parent::__construct($app, $router); }
public function __construct(\Illuminate\Contracts\Foundation\Application $app, \Illuminate\Routing\Router $router) { parent::__construct($app, $router); }