Zend_Controller-Plugins-ActionStack.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect3 id="zend.controller.plugins.standard.actionstack">
  4. <title>ActionStack</title>
  5. <para>
  6. The <code>ActionStack</code> plugin allows you to manage a stack of
  7. requests, and operates as a <code>postDispatch</code> plugin. If a
  8. forward (i.e., a call to another action) is already detected in the
  9. current request object, it does nothing. However, if not, it checks its
  10. stack and pulls the topmost item off it and forwards to the action
  11. specified in that request. The stack is processed in LIFO order.
  12. </para>
  13. <para>
  14. You can retrieve the plugin from the front controller at any time using
  15. <classname>Zend_Controller_Front::getPlugin('Zend_Controller_Plugin_ActionStack')</classname>.
  16. Once you have the plugin object, there are a variety of mechanisms you
  17. can use to manipulate it.
  18. </para>
  19. <itemizedlist>
  20. <listitem><para>
  21. <code>getRegistry()</code> and <code>setRegistry()</code>.
  22. Internally, <code>ActionStack</code> uses a
  23. <classname>Zend_Registry</classname> instance to store the stack. You can
  24. substitute a different registry instance or retrieve it with
  25. these accessors.
  26. </para></listitem>
  27. <listitem><para>
  28. <code>getRegistryKey()</code> and <code>setRegistryKey()</code>.
  29. These can be used to indicate which registry key to use when
  30. pulling the stack. Default value is
  31. 'Zend_Controller_Plugin_ActionStack'.
  32. </para></listitem>
  33. <listitem><para>
  34. <code>getStack()</code> allows you to retrieve the stack of
  35. actions in its entirety.
  36. </para></listitem>
  37. <listitem><para>
  38. <code>pushStack()</code> and <code>popStack()</code> allow you
  39. to add to and pull from the stack, respectively.
  40. <code>pushStack()</code> accepts a request object.
  41. </para></listitem>
  42. </itemizedlist>
  43. <para>
  44. An additional method, <code>forward()</code>, expects a request object,
  45. and sets the state of the current request object in the front controller
  46. to the state of the provided request object, and markes it as
  47. undispatched (forcing another iteration of the dispatch loop).
  48. </para>
  49. </sect3>
  50. <!--
  51. vim:se ts=4 sw=4 et:
  52. -->