sfActionStackEntry.class.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
  5. * (c) 2004-2006 Sean Kerr <sean@code-box.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. /**
  11. * sfActionStackEntry represents information relating to a single sfAction request during a single HTTP request.
  12. *
  13. * @package symfony
  14. * @subpackage action
  15. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  16. * @author Sean Kerr <sean@code-box.org>
  17. * @version SVN: $Id: sfActionStackEntry.class.php 9044 2008-05-19 06:18:41Z Carl.Vondrick $
  18. */
  19. class sfActionStackEntry
  20. {
  21. protected
  22. $actionInstance = null,
  23. $actionName = null,
  24. $moduleName = null,
  25. $presentation = null;
  26. /**
  27. * Class constructor.
  28. *
  29. * @param string $moduleName A module name
  30. * @param string $actionName An action name
  31. * @param sfAction $actionInstance An sfAction implementation instance
  32. */
  33. public function __construct($moduleName, $actionName, $actionInstance)
  34. {
  35. $this->actionName = $actionName;
  36. $this->actionInstance = $actionInstance;
  37. $this->moduleName = $moduleName;
  38. }
  39. /**
  40. * Retrieves this entry's action name.
  41. *
  42. * @return string An action name
  43. */
  44. public function getActionName()
  45. {
  46. return $this->actionName;
  47. }
  48. /**
  49. * Retrieves this entry's action instance.
  50. *
  51. * @return sfAction An sfAction implementation instance
  52. */
  53. public function getActionInstance()
  54. {
  55. return $this->actionInstance;
  56. }
  57. /**
  58. * Retrieves this entry's module name.
  59. *
  60. * @return string A module name
  61. */
  62. public function getModuleName()
  63. {
  64. return $this->moduleName;
  65. }
  66. /**
  67. * Retrieves this entry's rendered view presentation.
  68. *
  69. * This will only exist if the view has processed and the render mode is set to sfView::RENDER_VAR.
  70. *
  71. * @return string Rendered view presentation
  72. */
  73. public function & getPresentation()
  74. {
  75. return $this->presentation;
  76. }
  77. /**
  78. * Sets the rendered presentation for this action.
  79. *
  80. * @param string $presentation A rendered presentation.
  81. */
  82. public function setPresentation(&$presentation)
  83. {
  84. $this->presentation =& $presentation;
  85. }
  86. }