vendor/symfony/src/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php
equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 /* |
|
4 * This file is part of the Symfony package. |
|
5 * |
|
6 * (c) Fabien Potencier <fabien@symfony.com> |
|
7 * |
|
8 * For the full copyright and license information, please view the LICENSE |
|
9 * file that was distributed with this source code. |
|
10 */ |
|
11 |
|
12 namespace Symfony\Component\HttpKernel\Event; |
|
13 |
|
14 use Symfony\Component\HttpKernel\HttpKernelInterface; |
|
15 use Symfony\Component\HttpFoundation\Request; |
|
16 |
|
17 /** |
|
18 * Allows to create a response for the return value of a controller |
|
19 * |
|
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 |
|
22 * response is set. |
|
23 * |
|
24 * @author Bernhard Schussek <bernhard.schussek@symfony.com> |
|
25 * |
|
26 * @api |
|
27 */ |
|
28 class GetResponseForControllerResultEvent extends GetResponseEvent |
|
29 { |
|
30 /** |
|
31 * The return value of the controller |
|
32 * @var mixed |
|
33 */ |
|
34 private $controllerResult; |
|
35 |
|
36 public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, $controllerResult) |
|
37 { |
|
38 parent::__construct($kernel, $request, $requestType); |
|
39 |
|
40 $this->controllerResult = $controllerResult; |
|
41 } |
|
42 |
|
43 /** |
|
44 * Returns the return value of the controller |
|
45 * |
|
46 * @return mixed The controller return value |
|
47 * |
|
48 * @api |
|
49 */ |
|
50 public function getControllerResult() |
|
51 { |
|
52 return $this->controllerResult; |
|
53 } |
|
54 } |