PHP Class Roller\RouteSet

Inheritance: implements Iterato\Iterator
Show file Open project: c9s/roller

Public Properties

Property Type Description
$before
$i
$routes
$routesMap

Public Methods

Method Description
__call ( $m, $a )
__set_state ( $data ) interface for loading cache from source
add ( string $path, mixed $callback, array $options = [] ) Path rule Add method, an alias from any() method
any ( string $path, mixed $callback, array $options = [] ) Add path rule with *ANY* request method
compile ( ) xxx: write this in extension to improve compile time performance.
current ( ) interface for iterating *
findRouteByPath ( string $path ) find route by route path
get ( $path, $callback, $options = [] ) __call magic is always slow than methods
getAnnotationReader ( )
getRoute ( $name ) get route by route name
importAnnotationFromReflectionMethod ( ReflectionMethod $reflMethod )
importAnnotationMethods ( $class, $methods = null )
key ( )
mount ( $prefix, RouteSet $routes ) xxx: write this in extension.
next ( )
post ( $path, $callback, $options = [] )
rewind ( )
valid ( )

Protected Methods

Method Description
_buildRoute ( $path, $callback, $options = [] ) using pure php to build route

Method Details

__call() public method

public __call ( $m, $a )

__set_state() static public method

interface for loading cache from source
static public __set_state ( $data )

_buildRoute() protected method

using pure php to build route
protected _buildRoute ( $path, $callback, $options = [] )

add() public method

Path rule Add method, an alias from any() method
public add ( string $path, mixed $callback, array $options = [] )
$path string
$callback mixed
$options array

any() public method

Add path rule with *ANY* request method
public any ( string $path, mixed $callback, array $options = [] )
$path string
$callback mixed
$options array

compile() public method

xxx: write this in extension to improve compile time performance.
public compile ( )

current() public method

interface for iterating *
public current ( )

findRouteByPath() public method

find route by route path
public findRouteByPath ( string $path )
$path string

get() public method

__call magic is always slow than methods
public get ( $path, $callback, $options = [] )

getAnnotationReader() public method

public getAnnotationReader ( )

getRoute() public method

get route by route name
public getRoute ( $name )

importAnnotationFromReflectionMethod() public method

public importAnnotationFromReflectionMethod ( ReflectionMethod $reflMethod )
$reflMethod ReflectionMethod

importAnnotationMethods() public method

public importAnnotationMethods ( $class, $methods = null )

key() public method

public key ( )

mount() public method

xxx: write this in extension.
public mount ( $prefix, RouteSet $routes )
$routes RouteSet

next() public method

public next ( )

post() public method

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

rewind() public method

public rewind ( )

valid() public method

public valid ( )

Property Details

$before public property

public $before

$i public property

public $i

$routes public property

public $routes

$routesMap public property

public $routesMap