__construct() public method

Create a new Router instance.
public __construct ( Illuminate\Contracts\Events\Dispatcher $events, Illuminate\Container\Container $container = null ) : void
$events Illuminate\Contracts\Events\Dispatcher
$container Illuminate\Container\Container
return void
Exemplo n.º 1
0
 /**
  * Router constructor.
  * @param Dispatcher $events
  * @param Container $container
  */
 public function __construct(Dispatcher $events, Container $container)
 {
     parent::__construct($events, $container);
     $this->setRoutes(new RouteCollection());
     $this->adapterService = new AdapterService($this->container);
     $this->setDefaultAdapter(MainAdapter::name);
 }
Exemplo n.º 2
0
 /**
  * Load resource defaults and call parent
  *
  * @param Illuminate\Events\Dispatcher $events
  * @param Illuminate\Container\Container $container
  * @param Illuminate\Config\Repository $config
  * @param array $resourceDefaults
  * @return void
  */
 public function __construct($events, $container, $config, $resourceDefaults)
 {
     // Capture config
     $this->config = $config;
     // Load defaults
     $this->resourceDefaults = $resourceDefaults;
     // Hand off to parent
     return parent::__construct($events, $container);
 }
Exemplo n.º 3
0
 /**
  * Router constructor method
  *
  * @param \Illuminate\Contracts\Events\Dispatcher   $events
  * @param \Illuminate\Container\Container|null      $container
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->config = Config::get('lera');
     $this->createResources();
 }
Exemplo n.º 4
0
 /**
  * Create a new Router instance.
  *
  * @param  Dispatcher  $events
  * @param  Container  $container
  * @return void
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->routes = new RouteCollection();
 }
Exemplo n.º 5
0
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->version = substr($container::VERSION, 0, 3);
 }
Exemplo n.º 6
0
 /**
  * Create a new router instance.
  *
  * @param \Illuminate\Events\Dispatcher   $events
  * @param \Dingo\Api\Properties           $properties
  * @param \Illuminate\Container\Container $container
  *
  * @return void
  */
 public function __construct(Dispatcher $events, Properties $properties, Container $container = null)
 {
     $this->properties = $properties;
     $this->api = new GroupCollection($properties);
     parent::__construct($events, $container);
 }
 /**
  * Create a new Router instance.
  *
  * @param \Illuminate\Contracts\Events\Dispatcher $events
  * @param \Illuminate\Container\Container $container
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     // Add all registered named route middlewares after all service providers have been loaded
     app('events')->listen('bootstrapped: ' . BootProviders::class, RegisterRouteMiddleware::class);
 }
Exemplo n.º 8
0
 /**
  * Setup options for routing and pass container to parent
  *
  * @param  \Illuminate\Container\Container  $container
  * @return void
  */
 public function __construct(\Illuminate\Container\Container $container = null)
 {
     parent::__construct($container);
     $this->setOptions();
     $this->setExpressions();
 }
 /**
  * Create a new TranslatorRouter instance.
  *
  * @param  \Translator\Localizer  $localizer
  * @param  \Illuminate\Contracts\Events\Dispatcher  $events
  * @param  \Illuminate\Container\Container  $container
  * @return void
  */
 public function __construct(Localizer $localizer, Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
     $this->localizer = $localizer;
 }
Exemplo n.º 10
0
 /**
  * Router constructor.
  *
  * @param Dispatcher     $events
  * @param Container|null $container
  */
 public function __construct(Dispatcher $events, Container $container = null)
 {
     parent::__construct($events, $container);
 }