Orno\Route\RouteCollection::getDispatcher PHP Метод

getDispatcher() публичный Метод

Builds a dispatcher based on the routes attached to this collection
public getDispatcher ( ) : Dispatcher
Результат Dispatcher
    public function getDispatcher()
    {
        $dispatcher = new Dispatcher($this->container, $this->routes, $this->getData());
        if (!is_null($this->strategy)) {
            $dispatcher->setStrategy($this->strategy);
        }
        return $dispatcher;
    }

Usage Example

Пример #1
0
 /**
  * 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());
 }
All Usage Examples Of Orno\Route\RouteCollection::getDispatcher