Yaf_Router::getCurrentRouteGet the effective route name Descriptionpublic string Yaf_Router::getCurrentRoute()
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
Example #2 plugin Dummy.php (under application.directory/plugins)
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
|