Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The easiest way would be to use ZF's Redirect ActionHelper</p> <pre><code> $r = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector'); $r-&gt;gotoUrl('/some/url')-&gt;redirectAndExit(); </code></pre> <p>Alternatively instantiate it without the HelperBroker</p> <pre><code> $r = new Zend_Controller_Action_Helper_Redirector; $r-&gt;gotoUrl('/some/url')-&gt;redirectAndExit(); </code></pre> <p>The ActionHelper provides an API solely concerned about redirecting through a number of methods, like <code>gotoRoute</code>, <code>gotoUrl</code>, <code>gotoSimple</code>, which you can use depending on your desired UseCase. </p> <p>Internally, the ActionHelper uses the APIs of Response and Router to do the redirect though, so you can also use their methods directly, e.g.</p> <pre><code> $request-&gt;setModuleName('someModule') -&gt;setControllerName('someController') -&gt;setActionName('someAction'); </code></pre> <p>or</p> <pre><code> $response-&gt;setRedirect('/some/url', 200); </code></pre> <hr> <p>Further reading:</p> <ul> <li><a href="http://devzone.zend.com/article/3372-Front-Controller-Plugins-in-Zend-Framework" rel="noreferrer">http://devzone.zend.com/article/3372-Front-Controller-Plugins-in-Zend-Framework</a></li> <li><a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html" rel="noreferrer">http://framework.zend.com/manual/en/zend.controller.actionhelpers.html</a></li> <li><a href="http://framework.zend.com/manual/en/zend.controller.response.html" rel="noreferrer">http://framework.zend.com/manual/en/zend.controller.response.html</a></li> <li><a href="http://framework.zend.com/manual/en/zend.controller.plugins.html" rel="noreferrer">http://framework.zend.com/manual/en/zend.controller.plugins.html</a></li> <li><a href="http://framework.zend.com/apidoc/core" rel="noreferrer">http://framework.zend.com/apidoc/core</a></li> <li><a href="http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Controller/" rel="noreferrer">http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Controller/</a></li> </ul>
    singulars
    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.
    3. VO
      singulars
      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