PHP Class Roller\Router

Mostra file Open project: c9s/roller Class Usage Examples

Public Properties

Property Type Description
$cache * boolean, is cache enabled ?
$cacheDir cache directory
$cacheExpiry cache exxpiry
$cacheId cache id
$extensionSupport
$hasCache is cache found ?
$matchedRouteClass
$plugins plugins
$reload should we reload cache ? (not implemented yet)
$routes

Public Methods

Method Description
__call ( $m, $a ) dispatch methods to plugins (mixin) and routeset methods
__construct ( $routes = null, $options = [] )
add ( $path, $callback, $options = [] )
addPlugin ( $plugin )
any ( $path, $callback, $options = [] )
dispatch ( $path )
get ( $path, $callback, $options = [] ) We define get, post, any methods because __call is slower (2 times)
mount ( $prefix, $routeset )
post ( $path, $callback, $options = [] )

Private Methods

Method Description
makeCache ( )

Method Details

__call() public method

dispatch methods to plugins (mixin) and routeset methods
public __call ( $m, $a )

__construct() public method

public __construct ( $routes = null, $options = [] )

add() public method

public add ( $path, $callback, $options = [] )

addPlugin() public method

public addPlugin ( $plugin )

any() public method

public any ( $path, $callback, $options = [] )

dispatch() public method

public dispatch ( $path )

get() public method

We define get, post, any methods because __call is slower (2 times)
public get ( $path, $callback, $options = [] )

mount() public method

public mount ( $prefix, $routeset )

post() public method

public post ( $path, $callback, $options = [] )

Property Details

$cache public_oe property

* boolean, is cache enabled ?
public $cache

$cacheDir public_oe property

cache directory
public $cacheDir

$cacheExpiry public_oe property

cache exxpiry
public $cacheExpiry

$cacheId public_oe property

cache id
public $cacheId

$extensionSupport public_oe property

public $extensionSupport

$hasCache public_oe property

is cache found ?
public $hasCache

$matchedRouteClass public_oe property

public $matchedRouteClass

$plugins public_oe property

plugins
public $plugins

$reload public_oe property

should we reload cache ? (not implemented yet)
public $reload

$routes public_oe property

public $routes