Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Ruby routing based Router.
string $_chainNameSeparator = '-'Separator to use with chain names
DetailsZend_Controller_Router_Route_Interface $_currentRoute = 'null'Currently matched route
Detailsarray $_globalParams = 'array'Global parameters given to all routes
Detailsarray $_routes = 'array'Array of routes to match against
Detailsboolean $_useCurrentParamsAsGlobal = 'false'Determines if request parameters should be used as global parameters inside this router.
Detailsboolean $_useDefaultRoutes = 'true'Whether or not to use default routes
Details_addChainRoutesFromConfig(
string $name, Zend_Controller_Router_Route_Interface $route, Zend_Config $childRoutesInfo
)
:
voidAdd chain routes from a config route
Details_getRouteFromConfig(
Zend_Config $info
)
:
Zend_Controller_Router_Route_InterfaceGet a route frm a config instance
Details_setRequestParams(
$request, $params
)
:
DetailsaddConfig(
Zend_Config $config, string $section
=
null
)
:
Zend_Controller_Router_RewriteCreate routes out of Zend_Config configuration
Example INI: routes.archive.route = "archive/:year/*" routes.archive.defaults.controller = archive routes.archive.defaults.action = show routes.archive.defaults.year = 2000 routes.archive.reqs.year = "\d+"
routes.news.type = "Zend_Controller_Router_Route_Static" routes.news.route = "news" routes.news.defaults.controller = "news" routes.news.defaults.action = "list"
And finally after you have created a Zend_Config with above ini: $router = new Zend_Controller_Router_Rewrite(); $router->addConfig($config, 'routes');
DetailsaddDefaultRoutes(
)
:
Zend_Controller_Router_RewriteAdd default routes which are used to mimic basic router behaviour
DetailsaddRoute(
string $name, Zend_Controller_Router_Route_Interface $route
)
:
Zend_Controller_Router_RewriteAdd route to the route chain
If route contains method setRequest(), it is initialized with a request object
DetailsaddRoutes(
array $routes
)
:
Zend_Controller_Router_RewriteAdd routes to the route chain
Detailsassemble(
array $userParams, mixed $name
=
null, bool $reset
=
false, bool $encode
=
true
)
:
stringGenerates a URL path that can be used in URL creation, redirection, etc.
DetailsgetChainNameSeparator(
)
:
stringGet the separator to use for chain names
DetailsgetCurrentRoute(
)
:
Zend_Controller_Router_Route_InterfaceRetrieve a currently matched route
DetailsgetCurrentRouteName(
)
:
Zend_Controller_Router_Route_InterfaceRetrieve a name of currently matched route
DetailsgetRoute(
string $name
)
:
Zend_Controller_Router_Route_InterfaceRetrieve a named route
DetailsgetRoutes(
)
:
arrayRetrieve an array of routes added to the route chain
DetailshasRoute(
string $name
)
:
booleanCheck if named route exists
DetailsremoveDefaultRoutes(
)
:
Zend_Controller_Router_RewriteRemove all standard default routes
DetailsremoveRoute(
string $name
)
:
Zend_Controller_Router_RewriteRemove a route from the route chain
Detailsroute(
$request
)
:
Zend_Controller_Request_AbstractFind a matching route to the current PATH_INFO and inject returning values to the Request object.
DetailssetChainNameSeparator(
string $separator
)
:
Zend_Controller_Router_RewriteSet the separator to use with chain names
DetailssetGlobalParam(
string $name, mixed $value
)
:
Zend_Controller_Router_RewriteSet a global parameter
DetailsuseRequestParametersAsGlobal(
boolean|null $use
=
null
)
:
boolean|Zend_Controller_Router_RewriteDetermines/returns whether to use the request parameters as global parameters.
Details