class RouteCollection

Properties

protected array $reverse
protected DataGenerator $dataGenerator
protected RouteParser $routeParser
protected array $routes
protected array $pendingRoutes

Methods

__construct()

No description

get($path, $name, $handler)

No description

post($path, $name, $handler)

No description

put($path, $name, $handler)

No description

patch($path, $name, $handler)

No description

delete($path, $name, $handler)

No description

addRoute($method, $path, $name, $handler)

No description

removeRoute(string $name)

No description

void
applyRoutes()

No description

array
getRoutes()

No description

getRouteData()

No description

fixPathPart($part, $key, array $parameters)

No description

getPath($name, array $parameters = [])

No description

Details

__construct()

get($path, $name, $handler)

Parameters

$path
$name
$handler

post($path, $name, $handler)

Parameters

$path
$name
$handler

put($path, $name, $handler)

Parameters

$path
$name
$handler

patch($path, $name, $handler)

Parameters

$path
$name
$handler

delete($path, $name, $handler)

Parameters

$path
$name
$handler

addRoute($method, $path, $name, $handler)

Parameters

$method
$path
$name
$handler

RouteCollection removeRoute(string $name)

Parameters

string $name

Return Value

RouteCollection

protected void applyRoutes()

Return Value

void

array getRoutes()

Return Value

array

getRouteData()

protected fixPathPart($part, $key, array $parameters)

Parameters

$part
$key
array $parameters

getPath($name, array $parameters = [])

Parameters

$name
array $parameters