-
Clears all current routes.
-
filterParametersEvent ($event, $parameters)
Browse code
| $event |
An sfEvent instance |
| $parameters |
An array of parameters for the event |
Listens to the request.filter_parameters event.
-
-
(string) generate ($name, $params, $querydiv, $divider, $equals)
Browse code
| $name |
The route name |
| $params |
The parameter values |
| $querydiv |
The divider between URI and query string |
| $divider |
The divider between key/value pairs |
| $equals |
The equal sign to use between key and value |
Generates a valid URLs for parameters.
returns The generated URL
-
(string) getCurrentInternalUri ($with_route_name)
Browse code
| $with_route_name |
Whether to give an internal URI with the route name (@route) or with the module/action pair |
Gets the internal URI for the current request.
returns The current internal URI
-
Gets the current compiled route array.
returns The route array
-
Returns true if this instance has some routes.
-
initialize ($dispatcher, $cache, $options)
Browse code
| $dispatcher |
An sfEventDispatcher instance |
| $cache |
An sfCache instance |
| $options |
An associative array of initialization options. |
Initializes this sfRouting instance.
Available options:
* default_module: The default module name
* default_action: The default action name
* logging: Whether to log or not (false by default)
* debug: Whether to cache or not (false by default)
-
listenToChangeCultureEvent ()
Browse code
Listens to the user.change_culture event.
-
Loads routing configuration.
This methods notifies a routing.load_configuration event.
-
-
Parses a URL to find a matching route and sets internal state.
Throws a sfError404Exception if no route match the URL.
returns An array of parameters
throws sfError404Exception if the url is not parseable by the sfRouting object
-
setDefaultParameter ($key, $value)
Browse code
| $key |
The key |
| $value |
The value |
Sets a default parameter.
-
setDefaultParameters ($parameters)
Browse code
| $parameters |
An array of default parameters |
Sets the default parameters for URL generation.
-
(array) setRoutes ($routes)
Browse code
Sets the compiled route array.
returns The route array
-
Execute the shutdown procedure.
-
Class constructor.