Public Member Functions | |
constructor newMethod newPattern newHost newScript | |
host | |
method | |
pattern | |
script | |
relative path | |
matches request | |
tanzer::router::entry::constructor | newMethod newPattern newHost newScript | ||
Create a new route object with the specified case-insensitive HTTP method regular expression in $newMethod
, request path pattern in $newPattern
, Host:
header match pattern in $newHost
, and request handler in $newScript
.
tanzer::router::entry::host |
Returns the host matching regular expression for the current route.
tanzer::router::entry::matches | request | ||
Returns true if the tanzer::router::entry object specified by $route
matches the current request. Furthermore, upon a successful match, any positional parameters matching the :param
format are stored in the current request. The following match criteria are considered, in order:
$request
, then return false.Host:
header of $request
, then return false.$request
, then return false.As an additional side effect, any path components matching at and beyond the point of a route path glob are stored as a string in the request environment variable PATH_INFO
, in the same fashion as CGI/1.1.
tanzer::router::entry::method |
Returns the method routing regular expression for the current route.
tanzer::router::entry::pattern |
Returns the request path routing pattern for the current route.
tanzer::router::entry::relative | path | ||
Given an tanzer::uri object in $path
, return the relative path string matched by the ending glob.
tanzer::router::entry::script |
Returns the request handler callback script for the current route.