updated-packages
This commit is contained in:
30
vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php
vendored
Normal file
30
vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ControllerArgumentsEvent extends FilterControllerArgumentsEvent
|
||||
{
|
||||
}
|
29
vendor/symfony/http-kernel/Event/ControllerEvent.php
vendored
Normal file
29
vendor/symfony/http-kernel/Event/ControllerEvent.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Allows filtering of a controller callable.
|
||||
*
|
||||
* You can call getController() to retrieve the current controller. With
|
||||
* setController() you can set a new controller that is used in the processing
|
||||
* of the request.
|
||||
*
|
||||
* Controllers should be callables.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ControllerEvent extends FilterControllerEvent
|
||||
{
|
||||
}
|
31
vendor/symfony/http-kernel/Event/ExceptionEvent.php
vendored
Normal file
31
vendor/symfony/http-kernel/Event/ExceptionEvent.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Allows to create a response for a thrown exception.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You can also call setThrowable() to replace the thrown exception. This
|
||||
* exception will be thrown if no response is set during processing of this
|
||||
* event.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ExceptionEvent extends GetResponseForExceptionEvent
|
||||
{
|
||||
}
|
@@ -15,16 +15,7 @@ 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>
|
||||
* @deprecated since Symfony 4.3, use ControllerArgumentsEvent instead
|
||||
*/
|
||||
class FilterControllerArgumentsEvent extends FilterControllerEvent
|
||||
{
|
||||
|
@@ -15,15 +15,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows filtering of a controller callable.
|
||||
*
|
||||
* You can call getController() to retrieve the current controller. With
|
||||
* setController() you can set a new controller that is used in the processing
|
||||
* of the request.
|
||||
*
|
||||
* Controllers should be callables.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @deprecated since Symfony 4.3, use ControllerEvent instead
|
||||
*/
|
||||
class FilterControllerEvent extends KernelEvent
|
||||
{
|
||||
|
@@ -16,13 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows to filter a Response object.
|
||||
*
|
||||
* You can call getResponse() to retrieve the current response. With
|
||||
* setResponse() you can set a new response that will be returned to the
|
||||
* browser.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @deprecated since Symfony 4.3, use ResponseEvent instead
|
||||
*/
|
||||
class FilterResponseEvent extends KernelEvent
|
||||
{
|
||||
|
@@ -15,6 +15,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* Triggered whenever a request is fully processed.
|
||||
*
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class FinishRequestEvent extends KernelEvent
|
||||
{
|
||||
|
@@ -14,13 +14,7 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* Allows to create a response for a request.
|
||||
*
|
||||
* 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>
|
||||
* @deprecated since Symfony 4.3, use RequestEvent instead
|
||||
*/
|
||||
class GetResponseEvent extends KernelEvent
|
||||
{
|
||||
|
@@ -15,15 +15,9 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* @deprecated since Symfony 4.3, use ViewEvent instead
|
||||
*/
|
||||
class GetResponseForControllerResultEvent extends GetResponseEvent
|
||||
class GetResponseForControllerResultEvent extends RequestEvent
|
||||
{
|
||||
/**
|
||||
* The return value of the controller.
|
||||
|
@@ -11,63 +11,64 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows to create a response for a thrown exception.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* You can also call setException() to replace the thrown exception. This
|
||||
* exception will be thrown if no response is set during processing of this
|
||||
* event.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @deprecated since Symfony 4.3, use ExceptionEvent instead
|
||||
*/
|
||||
class GetResponseForExceptionEvent extends GetResponseEvent
|
||||
class GetResponseForExceptionEvent extends RequestEvent
|
||||
{
|
||||
/**
|
||||
* The exception object.
|
||||
*
|
||||
* @var \Exception
|
||||
*/
|
||||
private $throwable;
|
||||
private $exception;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowCustomResponseCode = false;
|
||||
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Exception $e)
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Throwable $e)
|
||||
{
|
||||
parent::__construct($kernel, $request, $requestType);
|
||||
|
||||
$this->setException($e);
|
||||
$this->setThrowable($e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the thrown exception.
|
||||
*
|
||||
* @return \Exception The thrown exception
|
||||
*/
|
||||
public function getException()
|
||||
public function getThrowable(): \Throwable
|
||||
{
|
||||
return $this->exception;
|
||||
return $this->throwable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the thrown exception.
|
||||
*
|
||||
* This exception will be thrown if no response is set in the event.
|
||||
*/
|
||||
public function setThrowable(\Throwable $exception): void
|
||||
{
|
||||
$this->exception = null;
|
||||
$this->throwable = $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Symfony 4.4, use getThrowable instead
|
||||
*
|
||||
* @return \Exception The thrown exception
|
||||
*/
|
||||
public function getException()
|
||||
{
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, use "getThrowable()" instead.', __METHOD__), \E_USER_DEPRECATED);
|
||||
|
||||
return $this->exception ?? $this->exception = $this->throwable instanceof \Exception ? $this->throwable : new FatalThrowableError($this->throwable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Symfony 4.4, use setThrowable instead
|
||||
*
|
||||
* @param \Exception $exception The thrown exception
|
||||
*/
|
||||
public function setException(\Exception $exception)
|
||||
{
|
||||
$this->exception = $exception;
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, use "setThrowable()" instead.', __METHOD__), \E_USER_DEPRECATED);
|
||||
|
||||
$this->throwable = $this->exception = $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,10 +27,8 @@ class KernelEvent extends Event
|
||||
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
|
||||
* @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, ?int $requestType)
|
||||
{
|
||||
|
@@ -16,12 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
/**
|
||||
* Allows to execute logic after a response was sent.
|
||||
*
|
||||
* Since it's only triggered on master requests, the `getRequestType()` method
|
||||
* will always return the value of `HttpKernelInterface::MASTER_REQUEST`.
|
||||
*
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @deprecated since Symfony 4.3, use TerminateEvent instead
|
||||
*/
|
||||
class PostResponseEvent extends KernelEvent
|
||||
{
|
||||
|
25
vendor/symfony/http-kernel/Event/RequestEvent.php
vendored
Normal file
25
vendor/symfony/http-kernel/Event/RequestEvent.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Allows to create a response for a request.
|
||||
*
|
||||
* 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 RequestEvent extends GetResponseEvent
|
||||
{
|
||||
}
|
27
vendor/symfony/http-kernel/Event/ResponseEvent.php
vendored
Normal file
27
vendor/symfony/http-kernel/Event/ResponseEvent.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Allows to filter a Response object.
|
||||
*
|
||||
* You can call getResponse() to retrieve the current response. With
|
||||
* setResponse() you can set a new response that will be returned to the
|
||||
* browser.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ResponseEvent extends FilterResponseEvent
|
||||
{
|
||||
}
|
26
vendor/symfony/http-kernel/Event/TerminateEvent.php
vendored
Normal file
26
vendor/symfony/http-kernel/Event/TerminateEvent.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Allows to execute logic after a response was sent.
|
||||
*
|
||||
* Since it's only triggered on master requests, the `getRequestType()` method
|
||||
* will always return the value of `HttpKernelInterface::MASTER_REQUEST`.
|
||||
*
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class TerminateEvent extends PostResponseEvent
|
||||
{
|
||||
}
|
27
vendor/symfony/http-kernel/Event/ViewEvent.php
vendored
Normal file
27
vendor/symfony/http-kernel/Event/ViewEvent.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ViewEvent extends GetResponseForControllerResultEvent
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user