Yaf_Route_Static::match
PHP function
Edit on GitHub ✎
(Yaf >=1.0.0)
Whether the route matches a URI
Description
Yaf_Route_Static::match(string $uri): bool
Determine whether the static route matches a URI. Since the static route matches any URI, this method always returns true.
Parameters
uriThe URI to check.
Return Values
Always returns true.
Examples
Yaf_Route_Static::match example
php
<?php
$route = new Yaf_Route_Static();
/* the static route matches any URI */
var_dump($route->match("/product/detail/id/10"));
var_dump($route->match("/"));
?>The above example will output something similar to:
output
bool(true)
bool(true)See Also
Yaf_Route_Static::route