PHP Class System\route

Datei anzeigen Open project: anchorcms/anchor-cms

Public Properties

Property Type Description
$args array The collected arguments from the uri match
$callbacks array Array of callable functions
$collection array Array of collection actions

Public Methods

Method Description
__callStatic ( $method, $arguments ) Define a route using the method name as the request method to listen for
__construct ( $callbacks, $args = [] ) Create a new instance of the Route class
action ( $name, $callback ) Register a action on the router
after ( $response ) Calls after actions
before ( ) : object Calls before actions
collection ( $actions, $definitions ) Start a collection of routes with common actions
register ( $method, $patterns, $arguments ) Register a route on the router
run ( ) : object Calls the route actions and returns a response object

Method Details

__callStatic() public static method

Define a route using the method name as the request method to listen for
public static __callStatic ( $method, $arguments )

__construct() public method

Create a new instance of the Route class
public __construct ( $callbacks, $args = [] )

action() public static method

Register a action on the router
public static action ( $name, $callback )

after() public method

Calls after actions
public after ( $response )

before() public method

Calls before actions
public before ( ) : object
return object

collection() public static method

Start a collection of routes with common actions
public static collection ( $actions, $definitions )

register() public static method

Register a route on the router
public static register ( $method, $patterns, $arguments )

run() public method

Calls the route actions and returns a response object
public run ( ) : object
return object

Property Details

$args public_oe property

The collected arguments from the uri match
public array $args
return array

$callbacks public_oe property

Array of callable functions
public array $callbacks
return array

$collection public_oe static_oe property

Array of collection actions
public static array $collection
return array