PHP Class Roller\MatchedRoute

$route; $route['path']; $route['compiled'];
Inheritance: implements ArrayAcces\ArrayAccess
Exibir arquivo Open project: c9s/roller

Public Properties

Property Type Description
$controller controller object (if route call class and object to handle request)
$path current dispatched path
$route Route data array()
$router router object

Public Methods

Method Description
__construct ( Roller\Router $router, array $route, string $path )
__get ( $n )
__invoke ( ) evaluate route
__isset ( $n ) magic accessor interface *
__set ( $n, $v )
createObjectFromReflection ( string $class = null, array $args = null, ReflectionClass $rc = null ) : Roller\Controller Create object with/from ReflectionClass
getArgs ( )
getCallback ( )
getCallbackParameters ( $callback )
getController ( )
getDefault ( )
getPath ( )
getRequirement ( )
getRoute ( )
getRouter ( )
getVars ( )
initCallback ( mixed &$cb, array $args ) : ReflectionParameters Build callback array
offsetExists ( $name )
offsetGet ( $name )
offsetSet ( $name, $value ) ArrayAccess interface *
offsetUnset ( $name )
run ( ) : string Evaluate route and return response content.

Method Details

__construct() public method

public __construct ( Roller\Router $router, array $route, string $path )
$router Roller\Router router object.
$route array route hash.
$path string route path.

__get() public method

public __get ( $n )

__invoke() public method

evaluate route
public __invoke ( )

__isset() public method

magic accessor interface *
public __isset ( $n )

__set() public method

public __set ( $n, $v )

createObjectFromReflection() public method

Create object with/from ReflectionClass
public createObjectFromReflection ( string $class = null, array $args = null, ReflectionClass $rc = null ) : Roller\Controller
$class string Class name (which is optional if ReflectionClass object is specified)
$args array arguments for controller constructor.
$rc ReflectionClass Reflection class of controller class
return Roller\Controller

getArgs() public method

public getArgs ( )

getCallback() public method

public getCallback ( )

getCallbackParameters() public method

public getCallbackParameters ( $callback )

getController() public method

public getController ( )

getDefault() public method

public getDefault ( )

getPath() public method

public getPath ( )

getRequirement() public method

public getRequirement ( )

getRoute() public method

public getRoute ( )

getRouter() public method

public getRouter ( )

getVars() public method

public getVars ( )

initCallback() public method

Build callback array
public initCallback ( mixed &$cb, array $args ) : ReflectionParameters
$cb mixed callback object, can be array(object,method) or a Controller object
$args array arguments for contructor.
return ReflectionParameters

offsetExists() public method

public offsetExists ( $name )

offsetGet() public method

public offsetGet ( $name )

offsetSet() public method

ArrayAccess interface *
public offsetSet ( $name, $value )

offsetUnset() public method

public offsetUnset ( $name )

run() public method

Evaluate route and return response content.
public run ( ) : string
return string

Property Details

$controller public_oe property

controller object (if route call class and object to handle request)
public $controller

$path public_oe property

current dispatched path
public $path

$route public_oe property

Route data array()
public $route

$router public_oe property

router object
public $router