sfActionStackEntry.class.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 17858 2009-05-01 21:22:50Z FabianLange $
  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. }