The Route object holds a route recognition and generation routine.
See __construct() docs for usage.
Located in /Routes/lib/Horde/Routes/Route.php (line 21)
Is this an absolute path? (Mapper will not prepend SCRIPT_NAME)
Array of keyword args for special conditions (method, subDomain, function)
What to do on decoding errors? 'ignore' or 'replace'
Default keyword arguments for this route
Encoding of this route (not yet supported)
Does this route use explicit mode (no implicit defaults)?
Filter function to operate on arguments before generation
Default keywords that don't exist in the path; can't be changed by an incomng URL.
Maximum keys that this route could utilize.
Minimum keys required to generate this route
Regular expression for matching this route
Requirements for this route
The path for this route, such as ':controller/:action/:id'
Is this a static route?
Collection name if this is a RESTful route
Member name if this is a RESTful route
Name of the parent resource, if this is a RESTful route & has a parent
Last path part used by buildNextReg()
Requirements formatted as regexps suitable for preg_match()
Reverse of $routeList
Route path split by '/'
Characters that split the parts of a URL
Initialize a route, with a given routepath for matching/generation
The set of keyword args will be used as defaults.
Usage: $route = new Horde_Routes_Route(':controller/:action/:id');
$route = new Horde_Routes_Route('date/:year/:month/:day', array('controller'=>'blog', 'action'=>'view'));
$route = new Horde_Routes_Route('archives/:page', array('controller'=>'blog', 'action'=>'by_page', 'requirements' => array('page'=>'\d{1,2}'));
Note: Route is generally not called directly, a Mapper instance connect() method should be used to add routes.
Recursively build a regexp given a path, and a controller list.
Returns the regular expression string, and two booleans that can be ignored as they're only used internally by buildnextreg.
Generate a URL from ourself given a set of keyword arguments
Create the regular expression for matching.
Note: This MUST be called before match can function properly.
clist should be a list of valid controller strings that can be matched, for this reason makeregexp should be called by the web framework after it knows all available controllers that can be utilized.
Match a url to our regexp.
While the regexp might match, this operation isn't guaranteed as there's other factors that can cause a match to fail even though the regexp succeeds (Default that was relied on wasn't given, requirement regexp doesn't pass, etc.).
Therefore the calling function shouldn't assume this will return a valid dict, the other possible return is False if a match doesn't work out.
Creates a default array of strings
Puts together the array of defaults, turns non-null values to strings, and add in our action/id default if they use and do not specify it
Precondition: $this->_defaultKeys is an array of the currently assumed default keys
Utility function to walk the route backwards
Will determine the minimum keys we must have to generate a working route.
Utility method to walk the route, and pull out the valid dynamic/wildcard keys
Documentation generated on Sun, 30 Jan 2011 05:21:01 +0000 by phpDocumentor 1.4.3