Phprest\Config::getRouter PHP Method

getRouter() public method

public getRouter ( ) : RouteCollection
return Phprest\Router\RouteCollection
    public function getRouter()
    {
        return $this->router;
    }

Usage Example

Example #1
0
 public function testGetters()
 {
     $config = new Config('phprest', 1, true);
     $this->assertEquals('phprest', $config->getVendor());
     $this->assertEquals(1, $config->getApiVersion());
     $this->assertEquals(true, $config->isDebug());
     $this->assertInstanceOf('\\League\\Container\\Container', $config->getContainer());
     $this->assertInstanceOf('\\League\\Route\\RouteCollection', $config->getRouter());
     $this->assertInstanceOf('\\League\\Event\\Emitter', $config->getEventEmitter());
     $this->assertInstanceOf('\\Phprest\\Service\\Hateoas\\Config', $config->getHateoasConfig());
     $this->assertInstanceOf('\\Phprest\\Service\\Hateoas\\Service', $config->getHateoasService());
     $this->assertInstanceOf('\\League\\BooBoo\\Runner', $config->getErrorHandler());
     $this->assertInstanceOf('\\Phprest\\ErrorHandler\\Handler\\Log', $config->getLogHandler());
 }
All Usage Examples Of Phprest\Config::getRouter