summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2018-01-19 15:40:08 +0000
committerGreg Roach <fisharebest@gmail.com>2018-01-19 22:39:48 +0000
commit9499ed38534b88c310649782326f430b724fbe3a (patch)
tree3b10195a8e8e56024f75403869d5a56074314181 /vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php
parentc9b4efa1714b4374cc3446e0d3a1935da0cb3a59 (diff)
downloadwebtrees-9499ed38534b88c310649782326f430b724fbe3a.tar.gz
webtrees-9499ed38534b88c310649782326f430b724fbe3a.tar.bz2
webtrees-9499ed38534b88c310649782326f430b724fbe3a.zip
Add symfony/http-kernel
Diffstat (limited to 'vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php')
-rw-r--r--vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php61
1 files changed, 61 insertions, 0 deletions
diff --git a/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php b/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php
new file mode 100644
index 0000000000..f70ce09e0a
--- /dev/null
+++ b/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php
@@ -0,0 +1,61 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\HttpKernel\Event;
+
+use Symfony\Component\HttpKernel\HttpKernelInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * Allows to create a response for the return value of a controller.
+ *
+ * Call setResponse() to set the response that will be returned for the
+ * current request. The propagation of this event is stopped as soon as a
+ * response is set.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class GetResponseForControllerResultEvent extends GetResponseEvent
+{
+ /**
+ * The return value of the controller.
+ *
+ * @var mixed
+ */
+ private $controllerResult;
+
+ public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, $controllerResult)
+ {
+ parent::__construct($kernel, $request, $requestType);
+
+ $this->controllerResult = $controllerResult;
+ }
+
+ /**
+ * Returns the return value of the controller.
+ *
+ * @return mixed The controller return value
+ */
+ public function getControllerResult()
+ {
+ return $this->controllerResult;
+ }
+
+ /**
+ * Assigns the return value of the controller.
+ *
+ * @param mixed $controllerResult The controller return value
+ */
+ public function setControllerResult($controllerResult)
+ {
+ $this->controllerResult = $controllerResult;
+ }
+}