Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In your bootstrap, you'll need to configure some "routes". So, if your bootstrap ends something like this:</p> <pre><code>$frontController = Zend_Controller_Front::getInstance(); $frontController-&gt;dispatch(); </code></pre> <p>you can just add in some route definitions like this:</p> <pre><code>$frontController = Zend_Controller_Front::getInstance(); $router = $frontController-&gt;getRouter(); $router-&gt;addRoute( 'mylovelyroute', new Zend_Controller_Router_Route_Static( 'for-fun-link', array( 'controller' =&gt; 'test', 'action' =&gt; 'about' ) ) ); $router-&gt;addRoute( 'myotherroute', new Zend_Controller_Router_Route_Static( 'about-product', array( 'controller' =&gt; 'page', 'action' =&gt; 'about' ) ) ); $router-&gt;addRoute( 'justonemore', new Zend_Controller_Router_Route_Static( 'another/longer/path', array( 'controller' =&gt; 'mycontroller', 'action' =&gt; 'myaction', 'someparameter' =&gt; 'foo' ) ) ); $frontController-&gt;dispatch(); </code></pre> <p>The first parameter of <code>addRoute()</code> is just a unique name. <code>Zend_Controller_Router_Route_Static</code> takes the path you'd like to capture, and then an array of parameters, including a controller and action (and module if it applies).</p> <p>If you wanted to add complexity, you could load the routes out of a database, or start using more dynamic routes. The docs here are a useful next step: <a href="http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.standard" rel="nofollow">http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.standard</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload