关于Router API的一些知识

来源:互联网 发布:java 线程睡眠 编辑:程序博客网 时间:2024/05/18 02:27
class CakeRouteThe 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.

0 0
原创粉丝点击