Yaf_Route_Rewrite
final class Yaf_Route_Rewrite extends Yaf_Router implements Yaf_Route_Interface (View source)
For usage, please see the example section of Yaf_Route_Rewrite::__construct()
Properties
protected Yaf_Route_Interface[] | $_routes | from Yaf_Router | |
protected string | $_current | from Yaf_Router | |
protected string | $_route | ||
protected array | $_default | ||
protected array | $_verify |
Methods
No description
by default, Yaf_Router using a Yaf_Route_Static as its default route. you can add new routes into router's route stack by calling this method.
the newer route will be called before the older(route stack), and if the newer router return TRUE, the router process will be end. otherwise, the older one will be called.
Retrieve a route by name, see also Yaf_Router::getCurrentRoute()
Get the name of the route which is effective in the route process.
Note:
You should call this method after the route process finished, since before that, this method will always return NULL.
Yaf_Route_Rewrite::assemble() - Assemble a url
No description
Details
__construct(string $match, array $route, array $verify = null, string|null $reverse = null)
No description
Yaf_Router|false
addRoute(string $name, Yaf_Route_Interface $route)
by default, Yaf_Router using a Yaf_Route_Static as its default route. you can add new routes into router's route stack by calling this method.
the newer route will be called before the older(route stack), and if the newer router return TRUE, the router process will be end. otherwise, the older one will be called.
Yaf_Router|false
addConfig(Yaf_Config_Abstract $config)
Add routes defined by configs into Yaf_Router's route stack
bool
route(Yaf_Request_Abstract $request)
No description
Yaf_Route_Interface
getRoute(string $name)
Retrieve a route by name, see also Yaf_Router::getCurrentRoute()
Yaf_Route_Interface[]
getRoutes()
No description
string
getCurrentRoute()
Get the name of the route which is effective in the route process.
Note:
You should call this method after the route process finished, since before that, this method will always return NULL.
bool
assemble(array $info, array|null $query = null)
Yaf_Route_Rewrite::assemble() - Assemble a url
bool
match(string $uri)
No description