Laravel version update
Laravel version update
This commit is contained in:
52
vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php
vendored
Normal file
52
vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
<?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\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows filtering of controller arguments.
|
||||
*
|
||||
* You can call getController() to retrieve the controller and getArguments
|
||||
* to retrieve the current arguments. With setArguments() you can replace
|
||||
* arguments that are used to call the controller.
|
||||
*
|
||||
* Arguments set in the event must be compatible with the signature of the
|
||||
* controller.
|
||||
*
|
||||
* @author Christophe Coevoet <stof@notk.org>
|
||||
*/
|
||||
class FilterControllerArgumentsEvent extends FilterControllerEvent
|
||||
{
|
||||
private $arguments;
|
||||
|
||||
public function __construct(HttpKernelInterface $kernel, callable $controller, array $arguments, Request $request, $requestType)
|
||||
{
|
||||
parent::__construct($kernel, $controller, $request, $requestType);
|
||||
|
||||
$this->arguments = $arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getArguments()
|
||||
{
|
||||
return $this->arguments;
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
$this->arguments = $arguments;
|
||||
}
|
||||
}
|
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows filtering of a controller callable.
|
||||
@@ -27,9 +27,6 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
*/
|
||||
class FilterControllerEvent extends KernelEvent
|
||||
{
|
||||
/**
|
||||
* The current controller.
|
||||
*/
|
||||
private $controller;
|
||||
|
||||
public function __construct(HttpKernelInterface $kernel, callable $controller, Request $request, $requestType)
|
||||
@@ -49,13 +46,6 @@ class FilterControllerEvent extends KernelEvent
|
||||
return $this->controller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new controller.
|
||||
*
|
||||
* @param callable $controller
|
||||
*
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function setController(callable $controller)
|
||||
{
|
||||
$this->controller = $controller;
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows to filter a Response object.
|
||||
@@ -26,11 +26,6 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*/
|
||||
class FilterResponseEvent extends KernelEvent
|
||||
{
|
||||
/**
|
||||
* The current response object.
|
||||
*
|
||||
* @var Response
|
||||
*/
|
||||
private $response;
|
||||
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, Response $response)
|
||||
@@ -52,8 +47,6 @@ class FilterResponseEvent extends KernelEvent
|
||||
|
||||
/**
|
||||
* Sets a new response object.
|
||||
*
|
||||
* @param Response $response
|
||||
*/
|
||||
public function setResponse(Response $response)
|
||||
{
|
||||
|
@@ -24,17 +24,12 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
*/
|
||||
class GetResponseEvent extends KernelEvent
|
||||
{
|
||||
/**
|
||||
* The response object.
|
||||
*
|
||||
* @var Response
|
||||
*/
|
||||
private $response;
|
||||
|
||||
/**
|
||||
* Returns the response object.
|
||||
*
|
||||
* @return Response
|
||||
* @return Response|null
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
@@ -43,8 +38,6 @@ class GetResponseEvent extends KernelEvent
|
||||
|
||||
/**
|
||||
* Sets a response and stops event propagation.
|
||||
*
|
||||
* @param Response $response
|
||||
*/
|
||||
public function setResponse(Response $response)
|
||||
{
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows to create a response for the return value of a controller.
|
||||
|
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows to create a response for a thrown exception.
|
||||
@@ -36,6 +36,11 @@ class GetResponseForExceptionEvent extends GetResponseEvent
|
||||
*/
|
||||
private $exception;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowCustomResponseCode = false;
|
||||
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, \Exception $e)
|
||||
{
|
||||
parent::__construct($kernel, $request, $requestType);
|
||||
@@ -64,4 +69,22 @@ class GetResponseForExceptionEvent extends GetResponseEvent
|
||||
{
|
||||
$this->exception = $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the event as allowing a custom response code.
|
||||
*/
|
||||
public function allowCustomResponseCode()
|
||||
{
|
||||
$this->allowCustomResponseCode = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the event allows a custom response code.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isAllowingCustomResponseCode()
|
||||
{
|
||||
return $this->allowCustomResponseCode;
|
||||
}
|
||||
}
|
||||
|
28
vendor/symfony/http-kernel/Event/KernelEvent.php
vendored
28
vendor/symfony/http-kernel/Event/KernelEvent.php
vendored
@@ -11,9 +11,9 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Base class for events thrown in the HttpKernel component.
|
||||
@@ -22,28 +22,16 @@ use Symfony\Component\EventDispatcher\Event;
|
||||
*/
|
||||
class KernelEvent extends Event
|
||||
{
|
||||
/**
|
||||
* The kernel in which this event was thrown.
|
||||
*
|
||||
* @var HttpKernelInterface
|
||||
*/
|
||||
private $kernel;
|
||||
|
||||
/**
|
||||
* The request the kernel is currently processing.
|
||||
*
|
||||
* @var Request
|
||||
*/
|
||||
private $request;
|
||||
|
||||
/**
|
||||
* The request type the kernel is currently processing. One of
|
||||
* HttpKernelInterface::MASTER_REQUEST and HttpKernelInterface::SUB_REQUEST.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $requestType;
|
||||
|
||||
/**
|
||||
* @param HttpKernelInterface $kernel The kernel in which this event was thrown
|
||||
* @param Request $request The request the kernel is currently processing
|
||||
* @param int $requestType The request type the kernel is currently processing; one of
|
||||
* HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST
|
||||
*/
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, $requestType)
|
||||
{
|
||||
$this->kernel = $kernel;
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows to execute logic after a response was sent.
|
||||
|
Reference in New Issue
Block a user