暫無描述

GetResponseForControllerResultEvent.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\HttpKernel\Event;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\HttpKernel\HttpKernelInterface;
  13. /**
  14. * @deprecated since Symfony 4.3, use ViewEvent instead
  15. */
  16. class GetResponseForControllerResultEvent extends RequestEvent
  17. {
  18. /**
  19. * The return value of the controller.
  20. *
  21. * @var mixed
  22. */
  23. private $controllerResult;
  24. public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, $controllerResult)
  25. {
  26. parent::__construct($kernel, $request, $requestType);
  27. $this->controllerResult = $controllerResult;
  28. }
  29. /**
  30. * Returns the return value of the controller.
  31. *
  32. * @return mixed The controller return value
  33. */
  34. public function getControllerResult()
  35. {
  36. return $this->controllerResult;
  37. }
  38. /**
  39. * Assigns the return value of the controller.
  40. *
  41. * @param mixed $controllerResult The controller return value
  42. */
  43. public function setControllerResult($controllerResult)
  44. {
  45. $this->controllerResult = $controllerResult;
  46. }
  47. }