PHP Class Phprest\Router\RouteCollection

Inheritance: extends League\Route\RouteCollection
Mostrar archivo Open project: phprest/phprest Class Usage Examples

Protected Properties

Property Type Description
$routingTable keys: method, route, handler

Public Methods

Method Description
__construct ( League\Container\ContainerInterface $container = null, FastRoute\RouteParser $parser = null, FastRoute\DataGenerator $generator = null )
addRoute ( string $method, string $route, string | Closure $handler, League\Route\Strategy\StrategyInterface $strategy = null ) : RouteCollection Add a route to the collection.
getRoutingTable ( ) : array

Method Details

__construct() public method

public __construct ( League\Container\ContainerInterface $container = null, FastRoute\RouteParser $parser = null, FastRoute\DataGenerator $generator = null )
$container League\Container\ContainerInterface
$parser FastRoute\RouteParser
$generator FastRoute\DataGenerator

addRoute() public method

Add a route to the collection.
public addRoute ( string $method, string $route, string | Closure $handler, League\Route\Strategy\StrategyInterface $strategy = null ) : RouteCollection
$method string
$route string
$handler string | Closure
$strategy League\Route\Strategy\StrategyInterface
return RouteCollection

getRoutingTable() public method

public getRoutingTable ( ) : array
return array keys: method, route, handler

Property Details

$routingTable protected_oe property

keys: method, route, handler
protected $routingTable