public getDispatcher ( ) : |
||
return |
public function getDispatcher()
{
$dispatcher = new Dispatcher($this->container, $this->routes, $this->getData());
if (!is_null($this->strategy)) {
$dispatcher->setStrategy($this->strategy);
}
return $dispatcher;
}
/** * Asserts that `getDispatcher` method returns correct instance * * @return void */ public function testCollectionReturnsDispatcher() { $router = new RouteCollection(); $this->assertInstanceOf('Orno\\Route\\Dispatcher', $router->getDispatcher()); $this->assertInstanceOf('FastRoute\\Dispatcher\\GroupCountBased', $router->getDispatcher()); }