Yaf_Router::getCurrentRouteGet the effective route name Description
public string Yaf_Router::getCurrentRoute
( void
)
Get the name of the route which is effective in the route process.
ParametersThis function has no parameters. Return ValuesString, the name of the effective route. ExamplesExample #1 Register some routes in Bootstrap
<?php Example #2 plugin Dummy.php (under application.directory/plugins)
<?php The above example will output something similar to: /* for http://yourdomain.com/product/list/1 * DummyPlugin will output: */ string(7) "rewrite" /* for http://yourdomain.com/product/info/34 * DummyPlugin will output: */ string(5) "regex" /* for other request URI * DummyPlugin will output: */ string(8) "_default" See Also
|