-
Adds a new route.
Alias for the connect method.
-
Clears all current routes.
-
(array) connect (, , , )
Browse code
Adds a new route at the end of the current list of routes.
A route string is a string with 2 special constructions:
- :string: :string denotes a named paramater (available later as $request->getParameter('string'))
- *: * match an indefinite number of parameters in a route
Here is a very common rule in a symfony project:
$r->connect('/:module/:action/*');
returns current routes
-
(string) generate (, , )
Browse code
Generates a valid URLs for parameters.
returns The generated URL
-
(string) getCurrentInternalUri ()
Browse code
Gets the internal URI for the current request.
returns The current internal URI
-
(string) getCurrentRouteName ()
Browse code
Gets the current route name.
returns The route name
-
(sfRouting) getInstance ()
Browse code
Retrieve the singleton instance of this class.
returns The sfRouting implementation instance
-
(array) getRouteByName ()
Browse code
Gets a route by its name.
returns A route array
-
Gets the current compiled route array.
returns The route array
-
(boolean) hasRouteName ()
Browse code
Returns true if the route name given is defined.
-
(boolean) hasRoutes ()
Browse code
Returns true if this instance has some routes.
-
Parses a URL to find a matching route.
Returns null if no route match the URL.
returns An array of parameters
-
Adds a new route at the beginning of the current list of routes.
-
setCurrentRouteName ()
Browse code
Sets the current route name.
-
Sets the compiled route array.
returns The route array