PHP Class Webiny\Component\Router\Matcher\MatchedRoute

显示文件 Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
__construct ( Route $route, array $params )
getCallback ( ) : string Get callback of the matched route
getParams ( ) : array Get params extracted from the matched route.
getRoute ( ) : Route Returns the Route instance.
hasTags ( array $tags, boolean $matchAll = true ) : boolean Checks if the current matched route has the given tags.

Method Details

__construct() public method

public __construct ( Route $route, array $params )
$route Webiny\Component\Router\Route\Route Matched Route instance.
$params array Params extracted from the matched route.

getCallback() public method

Get callback of the matched route
public getCallback ( ) : string
return string

getParams() public method

Get params extracted from the matched route.
public getParams ( ) : array
return array

getRoute() public method

Returns the Route instance.
public getRoute ( ) : Route
return Webiny\Component\Router\Route\Route

hasTags() public method

Checks if the current matched route has the given tags.
public hasTags ( array $tags, boolean $matchAll = true ) : boolean
$tags array List of tags to match.
$matchAll boolean Match all, or only one of the tags.
return boolean