UserFrosting API

Router extends Router implements RouterInterface

Router.

This class extends Slim's router, to permit overriding of routes with the same signature.

Tags
author

Alex Weissman (https://alexanderweissman.com)

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
throws
InvalidArgumentException

if the route pattern isn't a string

Return values
RouteInterface

clearCache()

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
Return values
mixed

Search results