1 <?xml version="1.0" encoding="UTF-8"?>
3 <sect3 id="zend.controller.plugins.standard.actionstack">
4 <title>ActionStack</title>
7 The <emphasis>ActionStack</emphasis> plugin allows you to manage a stack of
8 requests, and operates as a <emphasis>postDispatch</emphasis> plugin. If a
9 forward (i.e., a call to another action) is already detected in the
10 current request object, it does nothing. However, if not, it checks its
11 stack and pulls the topmost item off it and forwards to the action
12 specified in that request. The stack is processed in <acronym>LIFO</acronym> order.
16 You can retrieve the plugin from the front controller at any time using
17 <methodname>Zend_Controller_Front::getPlugin('Zend_Controller_Plugin_ActionStack')</methodname>.
18 Once you have the plugin object, there are a variety of mechanisms you
19 can use to manipulate it.
25 <methodname>getRegistry()</methodname> and <methodname>setRegistry()</methodname>.
26 Internally, <emphasis>ActionStack</emphasis> uses a
27 <classname>Zend_Registry</classname> instance to store the stack. You can
28 substitute a different registry instance or retrieve it with
35 <methodname>getRegistryKey()</methodname> and
36 <methodname>setRegistryKey()</methodname>.
37 These can be used to indicate which registry key to use when
38 pulling the stack. Default value is
39 '<classname>Zend_Controller_Plugin_ActionStack</classname>'.
45 <methodname>getStack()</methodname> allows you to retrieve the stack of
46 actions in its entirety.
52 <methodname>pushStack()</methodname> and <methodname>popStack()</methodname> allow
53 you to add to and pull from the stack, respectively.
54 <methodname>pushStack()</methodname> accepts a request object.
60 An additional method, <methodname>forward()</methodname>, expects a request object,
61 and sets the state of the current request object in the front controller
62 to the state of the provided request object, and markes it as
63 undispatched (forcing another iteration of the dispatch loop).