Zend_Controller-Plugins-ActionStack.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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>
  21. <para>
  22. <methodname>getRegistry()</methodname> and <methodname>setRegistry()</methodname>.
  23. Internally, <emphasis>ActionStack</emphasis> uses a
  24. <classname>Zend_Registry</classname> instance to store the stack. You can
  25. substitute a different registry instance or retrieve it with
  26. these accessors.
  27. </para>
  28. </listitem>
  29. <listitem>
  30. <para>
  31. <methodname>getRegistryKey()</methodname> and
  32. <methodname>setRegistryKey()</methodname>.
  33. These can be used to indicate which registry key to use when
  34. pulling the stack. Default value is
  35. '<classname>Zend_Controller_Plugin_ActionStack</classname>'.
  36. </para>
  37. </listitem>
  38. <listitem>
  39. <para>
  40. <methodname>getStack()</methodname> allows you to retrieve the stack of
  41. actions in its entirety.
  42. </para>
  43. </listitem>
  44. <listitem>
  45. <para>
  46. <methodname>pushStack()</methodname> and <methodname>popStack()</methodname> allow
  47. you to add to and pull from the stack, respectively.
  48. <methodname>pushStack()</methodname> accepts a request object.
  49. </para>
  50. </listitem>
  51. </itemizedlist>
  52. <para>
  53. An additional method, <methodname>forward()</methodname>, expects a request object,
  54. and sets the state of the current request object in the front controller
  55. to the state of the provided request object, and markes it as
  56. undispatched (forcing another iteration of the dispatch loop).
  57. </para>
  58. </sect3>
  59. <!--
  60. vim:se ts=4 sw=4 et:
  61. -->