PHP Class CapMousse\ReactRestify\Routing\Route

Inheritance: extends CapMousse\ReactRestify\Evenement\EventEmitter
Show file Open project: capmousse/react-restify

Public Properties

Property Type Description
$action Callable Route action
$method String Route method type
$parsedRoute String Regexp ready route

Public Methods

Method Description
__construct ( String $method, String $uri, Callable $action )
after ( Callable $callback ) : Void Helper to listing to after event
isParsed ( ) : boolean Check if uri is parsed
parse ( ) : void Parse route uri
run ( Request $request, CapMousse\ReactRestify\Http\Response $response, Callable $next ) : Void Run the current route
where ( String $param, String $filter ) : void Create a new filter for current route

Method Details

__construct() public method

public __construct ( String $method, String $uri, Callable $action )
$method String
$uri String
$action Callable

after() public method

Helper to listing to after event
public after ( Callable $callback ) : Void
$callback Callable
return Void

isParsed() public method

Check if uri is parsed
public isParsed ( ) : boolean
return boolean

parse() public method

Parse route uri
public parse ( ) : void
return void

run() public method

Run the current route
public run ( Request $request, CapMousse\ReactRestify\Http\Response $response, Callable $next ) : Void
$request CapMousse\ReactRestify\Http\Request
$response CapMousse\ReactRestify\Http\Response
$next Callable
return Void

where() public method

Create a new filter for current route
public where ( String $param, String $filter ) : void
$param String parameter to filter
$filter String regexp to execute
return void

Property Details

$action public property

Route action
public Callable $action
return Callable

$method public property

Route method type
public String $method
return String

$parsedRoute public property

Regexp ready route
public String $parsedRoute
return String