PHP Class Webiny\Component\Router\Matcher\UrlMatcher

Inheritance: use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\StdLib\StdLibTrait
Show file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
match ( UrlObject $url ) : array | boolean This method tries to match the given url against the route collection.

Private Methods

Method Description
extractParameters ( $matches, CompiledRoute $compiledRoute ) : array Extracts and matches the parameters with their defined names.

Method Details

match() public method

If match is successful, an array with callback and params is returned. If match is not successful, false is returned.
public match ( UrlObject $url ) : array | boolean
$url Webiny\Component\StdLib\StdObject\UrlObject\UrlObject
return array | boolean