Constructor
Controller_Routing_Route
__construct
([
int $position =
null], [
Controller_Routing_Segment $segments =
null], [
array $constraints =
array()], [
array $defaults =
array()], [
string $name =
null])
-
int
$position: Route position
-
Controller_Routing_Segment
$segments: The list of segments in the route
-
array
$constraints: Any constraints on the route
-
array
$defaults: Any default parameters for the route
-
string
$name: The route name, if any
Return this route's constraints
array
constraints
()
Return this route's default parameters
array
defaults
()
Return this route's first segment
Determine if this route matches the given URL
boolean
match
(string $url, string $method, array &$params)
-
string
$url: The URL to match
-
string
$method: The request method (e.g. "GET")
-
array
&$params: Input/output parameter request parameters
Return this route's name
string
name
()
Tests if a request method matches any constraints set on this route
boolean
passes_method_constraints
(string $method)
-
string
$method: The request method to test
Tests if a request method matches any parameter constraints set on this route
boolean
passes_parameter_constraints
(array $params)
-
array
$params: The parameters to test
Return this route's position
int
position
()
Set this route's constraints
void
set_constraints
(array $constraints)
-
array
$constraints: The new constraints
Set this route's default parameters
void
set_defaults
(array $defaults)
-
array
$defaults: The new default values
Set this route's first segment
Set this route's name
void
set_name
(string $name)
-
string
$name: The new name
Set this route's position
void
set_position
(int $position)
-
int
$position: The new position value
Essentially the opposite of match(), this attempts to build a URL from a set of parameters. It returns the constructed URL on success, or false on failure.
mixed
url_for
(array $params, string $method)
-
array
$params: The parameters to assemble a URL for
-
string
$method: The request method (e.g. "GET")