class CakeRoute
The base class for custom routes to be based on.
CakeRoute::parse($url)
Parameters:
$url (string) – The string URL to parse.
Parses an incoming URL, and generates an array of request parameters that Dispatcher can act upon. Extending this method allows you to customize how incoming URLs are converted into an array. Return false from URL to indicate a match failure.
CakeRoute::match($url)
Parameters:
$url (array) – The routing array to convert into a string URL.
Attempt to match a URL array. If the URL matches the route parameters and settings, then return a generated string URL. If the URL doesn’t match the route parameters, false will be returned. This method handles the reverse routing or conversion of URL arrays into string URLs.
CakeRoute::compile()
Force a route to compile its regular expression.
关于Router API的一些知识
最新推荐文章于 2024-06-10 01:36:28 发布