Zend_Controller-Plugins-ActionStack.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 <emphasis>ActionStack</emphasis> plugin allows you to manage a stack of
  7. requests, and operates as a <emphasis>postDispatch</emphasis> 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 <acronym>LIFO</acronym> order.
  12. </para>
  13. <para>
  14. You can retrieve the plugin from the front controller at any time using
  15. <methodname>Zend_Controller_Front::getPlugin('Zend_Controller_Plugin_ActionStack')</methodname>.
  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. <methodname>getRegistry()</methodname> and <methodname>setRegistry()</methodname>.
  22. Internally, <emphasis>ActionStack</emphasis> 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. <methodname>getRegistryKey()</methodname> and
  29. <methodname>setRegistryKey()</methodname>.
  30. These can be used to indicate which registry key to use when
  31. pulling the stack. Default value is
  32. '<classname>Zend_Controller_Plugin_ActionStack</classname>'.
  33. </para></listitem>
  34. <listitem><para>
  35. <methodname>getStack()</methodname> allows you to retrieve the stack of
  36. actions in its entirety.
  37. </para></listitem>
  38. <listitem><para>
  39. <methodname>pushStack()</methodname> and <methodname>popStack()</methodname> allow
  40. you to add to and pull from the stack, respectively.
  41. <methodname>pushStack()</methodname> accepts a request object.
  42. </para></listitem>
  43. </itemizedlist>
  44. <para>
  45. An additional method, <methodname>forward()</methodname>, expects a request object,
  46. and sets the state of the current request object in the front controller
  47. to the state of the provided request object, and markes it as
  48. undispatched (forcing another iteration of the dispatch loop).
  49. </para>
  50. </sect3>
  51. <!--
  52. vim:se ts=4 sw=4 et:
  53. -->