class RouteCollection

Properties

protected $reverse
protected $dataGenerator
protected $routeParser
protected $routes
protected $pendingRoutes

Methods

__construct()

No description

get(string $path, string $name, callable|string $handler)

No description

post(string $path, string $name, callable|string $handler)

No description

put(string $path, string $name, callable|string $handler)

No description

patch(string $path, string $name, callable|string $handler)

No description

delete(string $path, string $name, callable|string $handler)

No description

addRoute(string $method, string $path, string $name, callable|string $handler)

No description

removeRoute(string $name)

No description

void
applyRoutes()

No description

array
getRoutes()

No description

array
getRouteData()

No description

string
fixPathPart(mixed $part, array $parameters, string $routeName)

No description

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

No description

Details

__construct()

RouteCollection get(string $path, string $name, callable|string $handler)

Parameters

string $path
string $name
callable|string $handler

Return Value

RouteCollection

RouteCollection post(string $path, string $name, callable|string $handler)

Parameters

string $path
string $name
callable|string $handler

Return Value

RouteCollection

RouteCollection put(string $path, string $name, callable|string $handler)

Parameters

string $path
string $name
callable|string $handler

Return Value

RouteCollection

RouteCollection patch(string $path, string $name, callable|string $handler)

Parameters

string $path
string $name
callable|string $handler

Return Value

RouteCollection

RouteCollection delete(string $path, string $name, callable|string $handler)

Parameters

string $path
string $name
callable|string $handler

Return Value

RouteCollection

RouteCollection addRoute(string $method, string $path, string $name, callable|string $handler)

Parameters

string $method
string $path
string $name
callable|string $handler

Return Value

RouteCollection

RouteCollection removeRoute(string $name)

Parameters

string $name

Return Value

RouteCollection

protected void applyRoutes()

Return Value

void

array getRoutes()

Return Value

array

array getRouteData()

Return Value

array

protected string fixPathPart(mixed $part, array $parameters, string $routeName)

Parameters

mixed $part
array $parameters
string $routeName

Return Value

string

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

Parameters

string $name
array $parameters

Return Value

string