4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel\Event;
14 use Symfony\Component\HttpFoundation\Request;
15 use Symfony\Component\HttpKernel\HttpKernelInterface;
18 * Allows to create a response for the return value of a controller.
20 * Call setResponse() to set the response that will be returned for the
21 * current request. The propagation of this event is stopped as soon as a
24 * @author Bernhard Schussek <bschussek@gmail.com>
26 class GetResponseForControllerResultEvent extends GetResponseEvent
29 * The return value of the controller.
33 private $controllerResult;
35 public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, $controllerResult)
37 parent::__construct($kernel, $request, $requestType);
39 $this->controllerResult = $controllerResult;
43 * Returns the return value of the controller.
45 * @return mixed The controller return value
47 public function getControllerResult()
49 return $this->controllerResult;
53 * Assigns the return value of the controller.
55 * @param mixed $controllerResult The controller return value
57 public function setControllerResult($controllerResult)
59 $this->controllerResult = $controllerResult;