<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect2 id="zend.application.available-resources.router">
    <title>Zend_Application_Resource_Router</title>

    <para>
        <classname>Zend_Application_Resource_Router</classname> can be used to
        configure the router as it is registered with the Front Controller.
        Configuration options are per <link
        linkend="zend.controller.router.routes.standard">the
            <classname>Zend_Controller_Router_Route</classname> options</link>.
    </para>

    <example id="zend.application.available-resources.router.configExample">
        <title>Sample Router Resource configuration</title>

        <para>
            Below is a sample <acronym>INI</acronym> snippet showing how to
            configure the router resource.
        </para>

        <programlisting language="ini"><![CDATA[
resources.router.routes.route_id.route               = "/login"
resources.router.routes.route_id.defaults.module     = "admin"
resources.router.routes.route_id.defaults.controller = "user"
resources.router.routes.route_id.defaults.action     = "login"

; Optionally you can also set a Chain Name Separator:
resources.router.chainNameSeparator = "_"

; Example with parameter
resources.router.routes.route_id.route               = "/user/:user_id"
resources.router.routes.route_id.defaults.module     = "admin"
resources.router.routes.route_id.defaults.controller = "user"
resources.router.routes.route_id.defaults.action     = "edit"
resources.router.routes.route_id.reqs.user_id        = "^\d+$"
]]></programlisting>

        <para>For more information on the Chain Name Separator, please see
            <link linkend="zend.controller.router.routes.chain.config">its section</link>.
        </para>
    </example>
</sect2>
