public function __construct(Dispatcher $events, Container $container = null) { $this->events = $events; $this->routes = new RouteCollection(); $this->container = $container ?: new Container(); $this->bind('_missing', function ($v) { return explode('/', $v); }); }
/** * 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); }