Router extends Router implements RouterInterface
Router.
This class extends Slim's router, to permit overriding of routes with the same signature.
Tags
Table of Contents
$identifiers | string[] | |
---|---|---|
map() | Add route. | RouteInterface |
clearCache() | Delete the cache file. | bool |
loadRoutes() | Load all avaialbe routes. | mixed |
Properties
$identifiers
protected
string[]
$identifiers
Methods
map()
Add route.
public
map(
$methods :
string[]
, $pattern :
string
, $handler :
callable
)
: RouteInterface
Parameters
- $methods : string[]
Array of HTTP methods
- $pattern : string
The route pattern
- $handler : callable
The route callable
Tags
Return values
RouteInterfaceclearCache()
Delete the cache file.
public
clearCache(
)
: bool
Return values
bool —true/false if operation is successfull
loadRoutes()
Load all avaialbe routes.
public
loadRoutes(
$slimApp :
App
)
: mixed
Parameters
- $slimApp : App