| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <sect3 id="zend.controller.plugins.standard.actionstack">
- <title>ActionStack</title>
- <para>
- The <code>ActionStack</code> plugin allows you to manage a stack of
- requests, and operates as a <code>postDispatch</code> plugin. If a
- forward (i.e., a call to another action) is already detected in the
- current request object, it does nothing. However, if not, it checks its
- stack and pulls the topmost item off it and forwards to the action
- specified in that request. The stack is processed in LIFO order.
- </para>
- <para>
- You can retrieve the plugin from the front controller at any time using
- <classname>Zend_Controller_Front::getPlugin('Zend_Controller_Plugin_ActionStack')</classname>.
- Once you have the plugin object, there are a variety of mechanisms you
- can use to manipulate it.
- </para>
- <itemizedlist>
- <listitem><para>
- <code>getRegistry()</code> and <code>setRegistry()</code>.
- Internally, <code>ActionStack</code> uses a
- <classname>Zend_Registry</classname> instance to store the stack. You can
- substitute a different registry instance or retrieve it with
- these accessors.
- </para></listitem>
- <listitem><para>
- <code>getRegistryKey()</code> and <code>setRegistryKey()</code>.
- These can be used to indicate which registry key to use when
- pulling the stack. Default value is
- 'Zend_Controller_Plugin_ActionStack'.
- </para></listitem>
- <listitem><para>
- <code>getStack()</code> allows you to retrieve the stack of
- actions in its entirety.
- </para></listitem>
- <listitem><para>
- <code>pushStack()</code> and <code>popStack()</code> allow you
- to add to and pull from the stack, respectively.
- <code>pushStack()</code> accepts a request object.
- </para></listitem>
- </itemizedlist>
- <para>
- An additional method, <code>forward()</code>, expects a request object,
- and sets the state of the current request object in the front controller
- to the state of the provided request object, and markes it as
- undispatched (forcing another iteration of the dispatch loop).
- </para>
- </sect3>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|