the whole shebang
This commit is contained in:
33
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php
vendored
Normal file
33
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* AccessDeniedHttpException.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Christophe Coevoet <stof@notk.org>
|
||||
*/
|
||||
class AccessDeniedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(403, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php
vendored
Normal file
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* BadRequestHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class BadRequestHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(400, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php
vendored
Normal file
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* ConflictHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class ConflictHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(409, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
25
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FatalErrorException.php
vendored
Normal file
25
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FatalErrorException.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\Exception;
|
||||
|
||||
use Symfony\Component\Debug\Exception\FatalErrorException as DebugFatalErrorException;
|
||||
|
||||
/**
|
||||
* Fatal Error Exception.
|
||||
*
|
||||
* @author Konstanton Myakshin <koc-dp@yandex.ru>
|
||||
*
|
||||
* @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead.
|
||||
*/
|
||||
class FatalErrorException extends DebugFatalErrorException
|
||||
{
|
||||
}
|
27
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php
vendored
Normal file
27
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.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\Exception;
|
||||
|
||||
use Symfony\Component\Debug\Exception\FlattenException as DebugFlattenException;
|
||||
|
||||
/**
|
||||
* FlattenException wraps a PHP Exception to be able to serialize it.
|
||||
*
|
||||
* Basically, this class removes all objects from the trace.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead.
|
||||
*/
|
||||
class FlattenException extends DebugFlattenException
|
||||
{
|
||||
}
|
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php
vendored
Normal file
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* GoneHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class GoneHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(410, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
41
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpException.php
vendored
Normal file
41
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpException.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* HttpException.
|
||||
*
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
*/
|
||||
class HttpException extends \RuntimeException implements HttpExceptionInterface
|
||||
{
|
||||
private $statusCode;
|
||||
private $headers;
|
||||
|
||||
public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = array(), $code = 0)
|
||||
{
|
||||
$this->statusCode = $statusCode;
|
||||
$this->headers = $headers;
|
||||
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
public function getStatusCode()
|
||||
{
|
||||
return $this->statusCode;
|
||||
}
|
||||
|
||||
public function getHeaders()
|
||||
{
|
||||
return $this->headers;
|
||||
}
|
||||
}
|
34
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php
vendored
Normal file
34
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* Interface for HTTP error exceptions.
|
||||
*
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
*/
|
||||
interface HttpExceptionInterface
|
||||
{
|
||||
/**
|
||||
* Returns the status code.
|
||||
*
|
||||
* @return integer An HTTP response status code
|
||||
*/
|
||||
public function getStatusCode();
|
||||
|
||||
/**
|
||||
* Returns response headers.
|
||||
*
|
||||
* @return array Response headers
|
||||
*/
|
||||
public function getHeaders();
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* LengthRequiredHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class LengthRequiredHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(411, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* MethodNotAllowedHttpException.
|
||||
*
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
*/
|
||||
class MethodNotAllowedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $allow An array of allowed methods
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
$headers = array('Allow' => strtoupper(implode(', ', $allow)));
|
||||
|
||||
parent::__construct(405, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php
vendored
Normal file
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* NotAcceptableHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class NotAcceptableHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(406, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php
vendored
Normal file
32
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* NotFoundHttpException.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
class NotFoundHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(404, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* PreconditionFailedHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class PreconditionFailedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(412, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* PreconditionRequiredHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
* @see http://tools.ietf.org/html/rfc6585
|
||||
*/
|
||||
class PreconditionRequiredHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(428, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* ServiceUnavailableHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class ServiceUnavailableHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
$headers = array();
|
||||
if ($retryAfter) {
|
||||
$headers = array('Retry-After' => $retryAfter);
|
||||
}
|
||||
|
||||
parent::__construct(503, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* TooManyRequestsHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
* @see http://tools.ietf.org/html/rfc6585
|
||||
*/
|
||||
class TooManyRequestsHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param integer|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
$headers = array();
|
||||
if ($retryAfter) {
|
||||
$headers = array('Retry-After' => $retryAfter);
|
||||
}
|
||||
|
||||
parent::__construct(429, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
35
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php
vendored
Normal file
35
vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* UnauthorizedHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class UnauthorizedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $challenge WWW-Authenticate challenge string
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
$headers = array('WWW-Authenticate' => $challenge);
|
||||
|
||||
parent::__construct(401, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
<?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\Exception;
|
||||
|
||||
/**
|
||||
* UnsupportedMediaTypeHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class UnsupportedMediaTypeHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param integer $code The internal exception code
|
||||
*/
|
||||
public function __construct($message = null, \Exception $previous = null, $code = 0)
|
||||
{
|
||||
parent::__construct(415, $message, $previous, array(), $code);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user