Update to Drupal 8.0-dev-2015-11-17. Commits through da81cd220, Tue Nov 17 15:53:49 2015 +0000, Issue #2617224 by Wim Leers: Move around/fix some documentation.
This commit is contained in:
parent
4afb23bbd3
commit
7784f4c23d
929 changed files with 19798 additions and 5304 deletions
20
vendor/symfony/http-foundation/Cookie.php
vendored
20
vendor/symfony/http-foundation/Cookie.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* Represents a cookie.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Cookie
|
||||
{
|
||||
|
@ -40,8 +38,6 @@ class Cookie
|
|||
* @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($name, $value = null, $expire = 0, $path = '/', $domain = null, $secure = false, $httpOnly = true)
|
||||
{
|
||||
|
@ -116,8 +112,6 @@ class Cookie
|
|||
* Gets the name of the cookie.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
|
@ -128,8 +122,6 @@ class Cookie
|
|||
* Gets the value of the cookie.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
|
@ -140,8 +132,6 @@ class Cookie
|
|||
* Gets the domain that the cookie is available to.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDomain()
|
||||
{
|
||||
|
@ -152,8 +142,6 @@ class Cookie
|
|||
* Gets the time the cookie expires.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExpiresTime()
|
||||
{
|
||||
|
@ -164,8 +152,6 @@ class Cookie
|
|||
* Gets the path on the server in which the cookie will be available on.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
|
@ -176,8 +162,6 @@ class Cookie
|
|||
* Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSecure()
|
||||
{
|
||||
|
@ -188,8 +172,6 @@ class Cookie
|
|||
* Checks whether the cookie will be made accessible only through the HTTP protocol.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isHttpOnly()
|
||||
{
|
||||
|
@ -200,8 +182,6 @@ class Cookie
|
|||
* Whether this cookie is about to be cleared.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isCleared()
|
||||
{
|
||||
|
|
10
vendor/symfony/http-foundation/File/File.php
vendored
10
vendor/symfony/http-foundation/File/File.php
vendored
|
@ -20,8 +20,6 @@ use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
|
|||
* A file in the file system.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class File extends \SplFileInfo
|
||||
{
|
||||
|
@ -32,8 +30,6 @@ class File extends \SplFileInfo
|
|||
* @param bool $checkPath Whether to check the path or not
|
||||
*
|
||||
* @throws FileNotFoundException If the given path is not a file
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($path, $checkPath = true)
|
||||
{
|
||||
|
@ -54,8 +50,6 @@ class File extends \SplFileInfo
|
|||
*
|
||||
* @return string|null The guessed extension or null if it cannot be guessed
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @see ExtensionGuesser
|
||||
* @see getMimeType()
|
||||
*/
|
||||
|
@ -77,8 +71,6 @@ class File extends \SplFileInfo
|
|||
* @return string|null The guessed mime type (i.e. "application/pdf")
|
||||
*
|
||||
* @see MimeTypeGuesser
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMimeType()
|
||||
{
|
||||
|
@ -96,8 +88,6 @@ class File extends \SplFileInfo
|
|||
* @return File A File object representing the new file
|
||||
*
|
||||
* @throws FileException if the target file could not be created
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function move($directory, $name = null)
|
||||
{
|
||||
|
|
|
@ -21,8 +21,6 @@ use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
|
|||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class UploadedFile extends File
|
||||
{
|
||||
|
@ -86,8 +84,6 @@ class UploadedFile extends File
|
|||
*
|
||||
* @throws FileException If file_uploads is disabled
|
||||
* @throws FileNotFoundException If the file does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($path, $originalName, $mimeType = null, $size = null, $error = null, $test = false)
|
||||
{
|
||||
|
@ -107,8 +103,6 @@ class UploadedFile extends File
|
|||
* Then it should not be considered as a safe value.
|
||||
*
|
||||
* @return string|null The original name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientOriginalName()
|
||||
{
|
||||
|
@ -140,8 +134,6 @@ class UploadedFile extends File
|
|||
* @return string|null The mime type
|
||||
*
|
||||
* @see getMimeType()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientMimeType()
|
||||
{
|
||||
|
@ -180,8 +172,6 @@ class UploadedFile extends File
|
|||
* Then it should not be considered as a safe value.
|
||||
*
|
||||
* @return int|null The file size
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientSize()
|
||||
{
|
||||
|
@ -195,8 +185,6 @@ class UploadedFile extends File
|
|||
* Otherwise one of the other UPLOAD_ERR_XXX constants is returned.
|
||||
*
|
||||
* @return int The upload error
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getError()
|
||||
{
|
||||
|
@ -207,8 +195,6 @@ class UploadedFile extends File
|
|||
* Returns whether the file was uploaded successfully.
|
||||
*
|
||||
* @return bool True if the file has been uploaded with HTTP and no error occurred.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isValid()
|
||||
{
|
||||
|
@ -226,8 +212,6 @@ class UploadedFile extends File
|
|||
* @return File A File object representing the new file
|
||||
*
|
||||
* @throws FileException if, for any reason, the file could not have been moved
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function move($directory, $name = null)
|
||||
{
|
||||
|
|
10
vendor/symfony/http-foundation/FileBag.php
vendored
10
vendor/symfony/http-foundation/FileBag.php
vendored
|
@ -18,8 +18,6 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Bulat Shakirzyanov <mallluhuct@gmail.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class FileBag extends ParameterBag
|
||||
{
|
||||
|
@ -29,8 +27,6 @@ class FileBag extends ParameterBag
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $parameters An array of HTTP files
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $parameters = array())
|
||||
{
|
||||
|
@ -39,8 +35,6 @@ class FileBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $files = array())
|
||||
{
|
||||
|
@ -50,8 +44,6 @@ class FileBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $value)
|
||||
{
|
||||
|
@ -64,8 +56,6 @@ class FileBag extends ParameterBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $files = array())
|
||||
{
|
||||
|
|
24
vendor/symfony/http-foundation/HeaderBag.php
vendored
24
vendor/symfony/http-foundation/HeaderBag.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* HeaderBag is a container for HTTP headers.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class HeaderBag implements \IteratorAggregate, \Countable
|
||||
{
|
||||
|
@ -27,8 +25,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $headers = array())
|
||||
{
|
||||
|
@ -65,8 +61,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Returns the headers.
|
||||
*
|
||||
* @return array An array of headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
|
@ -77,8 +71,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Returns the parameter keys.
|
||||
*
|
||||
* @return array An array of parameter keys
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function keys()
|
||||
{
|
||||
|
@ -89,8 +81,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Replaces the current HTTP headers by a new set.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $headers = array())
|
||||
{
|
||||
|
@ -102,8 +92,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Adds new headers the current HTTP headers set.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $headers)
|
||||
{
|
||||
|
@ -120,8 +108,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $first Whether to return the first value or all header values
|
||||
*
|
||||
* @return string|array The first header value if $first is true, an array of values otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($key, $default = null, $first = true)
|
||||
{
|
||||
|
@ -148,8 +134,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param string $key The key
|
||||
* @param string|array $values The value or an array of values
|
||||
* @param bool $replace Whether to replace the actual value or not (true by default)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $values, $replace = true)
|
||||
{
|
||||
|
@ -174,8 +158,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param string $key The HTTP header
|
||||
*
|
||||
* @return bool true if the parameter exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
|
@ -189,8 +171,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @param string $value The HTTP value
|
||||
*
|
||||
* @return bool true if the value is contained in the header, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function contains($key, $value)
|
||||
{
|
||||
|
@ -201,8 +181,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* Removes a header.
|
||||
*
|
||||
* @param string $key The HTTP header name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
|
@ -224,8 +202,6 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
|||
* @return null|\DateTime The parsed DateTime or the default value if the header does not exist
|
||||
*
|
||||
* @throws \RuntimeException When the HTTP header is not parseable
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDate($key, \DateTime $default = null)
|
||||
{
|
||||
|
|
13
vendor/symfony/http-foundation/IpUtils.php
vendored
13
vendor/symfony/http-foundation/IpUtils.php
vendored
|
@ -57,18 +57,19 @@ class IpUtils
|
|||
* @param string $requestIp IPv4 address to check
|
||||
* @param string $ip IPv4 address or subnet in CIDR notation
|
||||
*
|
||||
* @return bool Whether the IP is valid
|
||||
* @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet.
|
||||
*/
|
||||
public static function checkIp4($requestIp, $ip)
|
||||
{
|
||||
if (false !== strpos($ip, '/')) {
|
||||
if ('0.0.0.0/0' === $ip) {
|
||||
return true;
|
||||
}
|
||||
|
||||
list($address, $netmask) = explode('/', $ip, 2);
|
||||
|
||||
if ($netmask < 1 || $netmask > 32) {
|
||||
if ($netmask === '0') {
|
||||
// Ensure IP is valid - using ip2long below implicitly validates, but we need to do it manually here
|
||||
return filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
|
||||
}
|
||||
|
||||
if ($netmask < 0 || $netmask > 32) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
|
28
vendor/symfony/http-foundation/ParameterBag.php
vendored
28
vendor/symfony/http-foundation/ParameterBag.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* ParameterBag is a container for key/value pairs.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ParameterBag implements \IteratorAggregate, \Countable
|
||||
{
|
||||
|
@ -31,8 +29,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $parameters = array())
|
||||
{
|
||||
|
@ -43,8 +39,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Returns the parameters.
|
||||
*
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
|
@ -55,8 +49,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Returns the parameter keys.
|
||||
*
|
||||
* @return array An array of parameter keys
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function keys()
|
||||
{
|
||||
|
@ -67,8 +59,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Replaces the current parameters by a new set.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $parameters = array())
|
||||
{
|
||||
|
@ -79,8 +69,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Adds parameters.
|
||||
*
|
||||
* @param array $parameters An array of parameters
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function add(array $parameters = array())
|
||||
{
|
||||
|
@ -97,8 +85,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @return mixed
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($path, $default = null, $deep = false)
|
||||
{
|
||||
|
@ -154,8 +140,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
*
|
||||
* @param string $key The key
|
||||
* @param mixed $value The value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $value)
|
||||
{
|
||||
|
@ -168,8 +152,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param string $key The key
|
||||
*
|
||||
* @return bool true if the parameter exists, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
|
@ -180,8 +162,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* Removes a parameter.
|
||||
*
|
||||
* @param string $key The key
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
|
@ -196,8 +176,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return string The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAlpha($key, $default = '', $deep = false)
|
||||
{
|
||||
|
@ -212,8 +190,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return string The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAlnum($key, $default = '', $deep = false)
|
||||
{
|
||||
|
@ -228,8 +204,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return string The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDigits($key, $default = '', $deep = false)
|
||||
{
|
||||
|
@ -245,8 +219,6 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||
* @param bool $deep If true, a path like foo[bar] will find deeper items
|
||||
*
|
||||
* @return int The filtered value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getInt($key, $default = 0, $deep = false)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* RedirectResponse represents an HTTP response doing a redirect.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class RedirectResponse extends Response
|
||||
{
|
||||
|
@ -32,8 +30,6 @@ class RedirectResponse extends Response
|
|||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @see http://tools.ietf.org/html/rfc2616#section-10.3
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($url, $status = 302, $headers = array())
|
||||
{
|
||||
|
|
102
vendor/symfony/http-foundation/Request.php
vendored
102
vendor/symfony/http-foundation/Request.php
vendored
|
@ -25,8 +25,6 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
|||
* * getUriForPath
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Request
|
||||
{
|
||||
|
@ -85,8 +83,6 @@ class Request
|
|||
* Custom parameters.
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $attributes;
|
||||
|
||||
|
@ -94,8 +90,6 @@ class Request
|
|||
* Request body parameters ($_POST).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $request;
|
||||
|
||||
|
@ -103,8 +97,6 @@ class Request
|
|||
* Query string parameters ($_GET).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $query;
|
||||
|
||||
|
@ -112,8 +104,6 @@ class Request
|
|||
* Server and execution environment parameters ($_SERVER).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ServerBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $server;
|
||||
|
||||
|
@ -121,8 +111,6 @@ class Request
|
|||
* Uploaded files ($_FILES).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\FileBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $files;
|
||||
|
||||
|
@ -130,8 +118,6 @@ class Request
|
|||
* Cookies ($_COOKIE).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\ParameterBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $cookies;
|
||||
|
||||
|
@ -139,8 +125,6 @@ class Request
|
|||
* Headers (taken from the $_SERVER).
|
||||
*
|
||||
* @var \Symfony\Component\HttpFoundation\HeaderBag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public $headers;
|
||||
|
||||
|
@ -231,8 +215,6 @@ class Request
|
|||
* @param array $files The FILES parameters
|
||||
* @param array $server The SERVER parameters
|
||||
* @param string|resource $content The raw body data
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
|
||||
{
|
||||
|
@ -251,8 +233,6 @@ class Request
|
|||
* @param array $files The FILES parameters
|
||||
* @param array $server The SERVER parameters
|
||||
* @param string|resource $content The raw body data
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
|
||||
{
|
||||
|
@ -281,8 +261,6 @@ class Request
|
|||
* Creates a new request with values from PHP's super globals.
|
||||
*
|
||||
* @return Request A new request
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function createFromGlobals()
|
||||
{
|
||||
|
@ -326,8 +304,6 @@ class Request
|
|||
* @param string $content The raw body data
|
||||
*
|
||||
* @return Request A Request instance
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null)
|
||||
{
|
||||
|
@ -446,8 +422,6 @@ class Request
|
|||
* @param array $server The SERVER parameters
|
||||
*
|
||||
* @return Request The duplicated request
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
|
||||
{
|
||||
|
@ -534,8 +508,6 @@ class Request
|
|||
*
|
||||
* It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE.
|
||||
* $_FILES is never overridden, see rfc1867
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function overrideGlobals()
|
||||
{
|
||||
|
@ -572,8 +544,6 @@ class Request
|
|||
* You should only list the reverse proxies that you manage directly.
|
||||
*
|
||||
* @param array $proxies A list of trusted proxies
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function setTrustedProxies(array $proxies)
|
||||
{
|
||||
|
@ -771,8 +741,6 @@ class Request
|
|||
* Gets the Session.
|
||||
*
|
||||
* @return SessionInterface|null The session
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
|
@ -784,8 +752,6 @@ class Request
|
|||
* previous requests.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasPreviousSession()
|
||||
{
|
||||
|
@ -801,8 +767,6 @@ class Request
|
|||
* is associated with a Session instance.
|
||||
*
|
||||
* @return bool true when the Request contains a Session object, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasSession()
|
||||
{
|
||||
|
@ -813,8 +777,6 @@ class Request
|
|||
* Sets the Session.
|
||||
*
|
||||
* @param SessionInterface $session The Session
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setSession(SessionInterface $session)
|
||||
{
|
||||
|
@ -886,8 +848,6 @@ class Request
|
|||
*
|
||||
* @see getClientIps()
|
||||
* @see http://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getClientIp()
|
||||
{
|
||||
|
@ -900,8 +860,6 @@ class Request
|
|||
* Returns current script name.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getScriptName()
|
||||
{
|
||||
|
@ -921,8 +879,6 @@ class Request
|
|||
* * http://localhost/mysite/about?var=1 returns '/about'
|
||||
*
|
||||
* @return string The raw path (i.e. not urldecoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPathInfo()
|
||||
{
|
||||
|
@ -944,8 +900,6 @@ class Request
|
|||
* * http://localhost/we%20b/index.php returns '/we%20b'
|
||||
*
|
||||
* @return string The raw path (i.e. not urldecoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getBasePath()
|
||||
{
|
||||
|
@ -965,8 +919,6 @@ class Request
|
|||
* script filename (e.g. index.php) if one exists.
|
||||
*
|
||||
* @return string The raw URL (i.e. not urldecoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getBaseUrl()
|
||||
{
|
||||
|
@ -981,8 +933,6 @@ class Request
|
|||
* Gets the request's scheme.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getScheme()
|
||||
{
|
||||
|
@ -1001,8 +951,6 @@ class Request
|
|||
* configure it via "setTrustedHeaderName()" with the "client-port" key.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPort()
|
||||
{
|
||||
|
@ -1076,8 +1024,6 @@ class Request
|
|||
* The port name will be appended to the host if it's non-standard.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHttpHost()
|
||||
{
|
||||
|
@ -1095,8 +1041,6 @@ class Request
|
|||
* Returns the requested URI (path and query string).
|
||||
*
|
||||
* @return string The raw URI (i.e. not URI decoded)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getRequestUri()
|
||||
{
|
||||
|
@ -1126,8 +1070,6 @@ class Request
|
|||
* @return string A normalized URI (URL) for the Request
|
||||
*
|
||||
* @see getQueryString()
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getUri()
|
||||
{
|
||||
|
@ -1144,8 +1086,6 @@ class Request
|
|||
* @param string $path A path to use instead of the current one
|
||||
*
|
||||
* @return string The normalized URI for the path
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getUriForPath($path)
|
||||
{
|
||||
|
@ -1214,8 +1154,6 @@ class Request
|
|||
* and have consistent escaping.
|
||||
*
|
||||
* @return string|null A normalized query string for the Request
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getQueryString()
|
||||
{
|
||||
|
@ -1227,7 +1165,7 @@ class Request
|
|||
/**
|
||||
* Checks whether the request is secure or not.
|
||||
*
|
||||
* This method can read the client port from the "X-Forwarded-Proto" header
|
||||
* This method can read the client protocol from the "X-Forwarded-Proto" header
|
||||
* when trusted proxies were set via "setTrustedProxies()".
|
||||
*
|
||||
* The "X-Forwarded-Proto" header must contain the protocol: "https" or "http".
|
||||
|
@ -1237,8 +1175,6 @@ class Request
|
|||
* the "client-proto" key.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSecure()
|
||||
{
|
||||
|
@ -1254,7 +1190,7 @@ class Request
|
|||
/**
|
||||
* Returns the host name.
|
||||
*
|
||||
* This method can read the client port from the "X-Forwarded-Host" header
|
||||
* This method can read the client host name from the "X-Forwarded-Host" header
|
||||
* when trusted proxies were set via "setTrustedProxies()".
|
||||
*
|
||||
* The "X-Forwarded-Host" header must contain the client host name.
|
||||
|
@ -1265,8 +1201,6 @@ class Request
|
|||
* @return string
|
||||
*
|
||||
* @throws \UnexpectedValueException when the host name is invalid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getHost()
|
||||
{
|
||||
|
@ -1316,8 +1250,6 @@ class Request
|
|||
* Sets the request method.
|
||||
*
|
||||
* @param string $method
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setMethod($method)
|
||||
{
|
||||
|
@ -1338,8 +1270,6 @@ class Request
|
|||
*
|
||||
* @return string The request method
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @see getRealMethod()
|
||||
*/
|
||||
public function getMethod()
|
||||
|
@ -1377,8 +1307,6 @@ class Request
|
|||
* @param string $format The format
|
||||
*
|
||||
* @return string The associated mime type (null if not found)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMimeType($format)
|
||||
{
|
||||
|
@ -1395,8 +1323,6 @@ class Request
|
|||
* @param string $mimeType The associated mime type
|
||||
*
|
||||
* @return string|null The format (null if not found)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getFormat($mimeType)
|
||||
{
|
||||
|
@ -1420,8 +1346,6 @@ class Request
|
|||
*
|
||||
* @param string $format The format
|
||||
* @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setFormat($format, $mimeTypes)
|
||||
{
|
||||
|
@ -1444,8 +1368,6 @@ class Request
|
|||
* @param string $default The default format
|
||||
*
|
||||
* @return string The request format
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getRequestFormat($default = 'html')
|
||||
{
|
||||
|
@ -1460,8 +1382,6 @@ class Request
|
|||
* Sets the request format.
|
||||
*
|
||||
* @param string $format The request format.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setRequestFormat($format)
|
||||
{
|
||||
|
@ -1472,8 +1392,6 @@ class Request
|
|||
* Gets the format associated with the request.
|
||||
*
|
||||
* @return string|null The format (null if no content type is present)
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getContentType()
|
||||
{
|
||||
|
@ -1484,8 +1402,6 @@ class Request
|
|||
* Sets the default locale.
|
||||
*
|
||||
* @param string $locale
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDefaultLocale($locale)
|
||||
{
|
||||
|
@ -1510,8 +1426,6 @@ class Request
|
|||
* Sets the locale.
|
||||
*
|
||||
* @param string $locale
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setLocale($locale)
|
||||
{
|
||||
|
@ -1544,8 +1458,6 @@ class Request
|
|||
* Checks whether the method is safe or not.
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isMethodSafe()
|
||||
{
|
||||
|
@ -1626,8 +1538,6 @@ class Request
|
|||
* @param array $locales An array of ordered available locales
|
||||
*
|
||||
* @return string|null The preferred locale
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getPreferredLanguage(array $locales = null)
|
||||
{
|
||||
|
@ -1661,8 +1571,6 @@ class Request
|
|||
* Gets a list of languages acceptable by the client browser.
|
||||
*
|
||||
* @return array Languages ordered in the user browser preferences
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getLanguages()
|
||||
{
|
||||
|
@ -1703,8 +1611,6 @@ class Request
|
|||
* Gets a list of charsets acceptable by the client browser.
|
||||
*
|
||||
* @return array List of charsets in preferable order
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCharsets()
|
||||
{
|
||||
|
@ -1733,8 +1639,6 @@ class Request
|
|||
* Gets a list of content types acceptable by the client browser.
|
||||
*
|
||||
* @return array List of content types in preferable order
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getAcceptableContentTypes()
|
||||
{
|
||||
|
@ -1754,8 +1658,6 @@ class Request
|
|||
* @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript
|
||||
*
|
||||
* @return bool true if the request is an XMLHttpRequest, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isXmlHttpRequest()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* RequestMatcher compares a pre-defined set of checks against a Request instance.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class RequestMatcher implements RequestMatcherInterface
|
||||
{
|
||||
|
@ -144,8 +142,6 @@ class RequestMatcher implements RequestMatcherInterface
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function matches(Request $request)
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* RequestMatcherInterface is an interface for strategies to match a Request.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface RequestMatcherInterface
|
||||
{
|
||||
|
@ -26,8 +24,6 @@ interface RequestMatcherInterface
|
|||
* @param Request $request The request to check for a match
|
||||
*
|
||||
* @return bool true if the request matches, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function matches(Request $request);
|
||||
}
|
||||
|
|
100
vendor/symfony/http-foundation/Response.php
vendored
100
vendor/symfony/http-foundation/Response.php
vendored
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* Response represents an HTTP response.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Response
|
||||
{
|
||||
|
@ -193,8 +191,6 @@ class Response
|
|||
* @param array $headers An array of response headers
|
||||
*
|
||||
* @throws \InvalidArgumentException When the HTTP status code is not valid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($content = '', $status = 200, $headers = array())
|
||||
{
|
||||
|
@ -203,7 +199,7 @@ class Response
|
|||
$this->setStatusCode($status);
|
||||
$this->setProtocolVersion('1.0');
|
||||
if (!$this->headers->has('Date')) {
|
||||
$this->setDate(new \DateTime(null, new \DateTimeZone('UTC')));
|
||||
$this->setDate(\DateTime::createFromFormat('U', time(), new \DateTimeZone('UTC')));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,8 +363,6 @@ class Response
|
|||
* Sends HTTP headers and content.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
|
@ -394,8 +388,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setContent($content)
|
||||
{
|
||||
|
@ -412,8 +404,6 @@ class Response
|
|||
* Gets the current response content.
|
||||
*
|
||||
* @return string Content
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
|
@ -426,8 +416,6 @@ class Response
|
|||
* @param string $version The HTTP protocol version
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setProtocolVersion($version)
|
||||
{
|
||||
|
@ -440,8 +428,6 @@ class Response
|
|||
* Gets the HTTP protocol version.
|
||||
*
|
||||
* @return string The HTTP protocol version
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getProtocolVersion()
|
||||
{
|
||||
|
@ -460,8 +446,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @throws \InvalidArgumentException When the HTTP status code is not valid
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setStatusCode($code, $text = null)
|
||||
{
|
||||
|
@ -491,8 +475,6 @@ class Response
|
|||
* Retrieves the status code for the current web response.
|
||||
*
|
||||
* @return int Status code
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getStatusCode()
|
||||
{
|
||||
|
@ -505,8 +487,6 @@ class Response
|
|||
* @param string $charset Character set
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCharset($charset)
|
||||
{
|
||||
|
@ -519,8 +499,6 @@ class Response
|
|||
* Retrieves the response charset.
|
||||
*
|
||||
* @return string Character set
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCharset()
|
||||
{
|
||||
|
@ -537,8 +515,6 @@ class Response
|
|||
* validator (Last-Modified, ETag) are considered uncacheable.
|
||||
*
|
||||
* @return bool true if the response is worth caching, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isCacheable()
|
||||
{
|
||||
|
@ -561,8 +537,6 @@ class Response
|
|||
* indicator or Expires header and the calculated age is less than the freshness lifetime.
|
||||
*
|
||||
* @return bool true if the response is fresh, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isFresh()
|
||||
{
|
||||
|
@ -574,8 +548,6 @@ class Response
|
|||
* the response with the origin server using a conditional GET request.
|
||||
*
|
||||
* @return bool true if the response is validateable, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isValidateable()
|
||||
{
|
||||
|
@ -588,8 +560,6 @@ class Response
|
|||
* It makes the response ineligible for serving other clients.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setPrivate()
|
||||
{
|
||||
|
@ -605,8 +575,6 @@ class Response
|
|||
* It makes the response eligible for serving other clients.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setPublic()
|
||||
{
|
||||
|
@ -625,8 +593,6 @@ class Response
|
|||
* greater than the value provided by the origin.
|
||||
*
|
||||
* @return bool true if the response must be revalidated by a cache, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function mustRevalidate()
|
||||
{
|
||||
|
@ -639,8 +605,6 @@ class Response
|
|||
* @return \DateTime A \DateTime instance
|
||||
*
|
||||
* @throws \RuntimeException When the header is not parseable
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getDate()
|
||||
{
|
||||
|
@ -653,8 +617,6 @@ class Response
|
|||
* @param \DateTime $date A \DateTime instance
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setDate(\DateTime $date)
|
||||
{
|
||||
|
@ -682,8 +644,6 @@ class Response
|
|||
* Marks the response stale by setting the Age header to be equal to the maximum age of the response.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function expire()
|
||||
{
|
||||
|
@ -698,8 +658,6 @@ class Response
|
|||
* Returns the value of the Expires header as a DateTime instance.
|
||||
*
|
||||
* @return \DateTime|null A DateTime instance or null if the header does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getExpires()
|
||||
{
|
||||
|
@ -719,8 +677,6 @@ class Response
|
|||
* @param \DateTime|null $date A \DateTime instance or null to remove the header
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setExpires(\DateTime $date = null)
|
||||
{
|
||||
|
@ -743,8 +699,6 @@ class Response
|
|||
* back on an expires header. It returns null when no maximum age can be established.
|
||||
*
|
||||
* @return int|null Number of seconds
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getMaxAge()
|
||||
{
|
||||
|
@ -769,8 +723,6 @@ class Response
|
|||
* @param int $value Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setMaxAge($value)
|
||||
{
|
||||
|
@ -787,8 +739,6 @@ class Response
|
|||
* @param int $value Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setSharedMaxAge($value)
|
||||
{
|
||||
|
@ -807,8 +757,6 @@ class Response
|
|||
* revalidating with the origin.
|
||||
*
|
||||
* @return int|null The TTL in seconds
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getTtl()
|
||||
{
|
||||
|
@ -825,8 +773,6 @@ class Response
|
|||
* @param int $seconds Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setTtl($seconds)
|
||||
{
|
||||
|
@ -843,8 +789,6 @@ class Response
|
|||
* @param int $seconds Number of seconds
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setClientTtl($seconds)
|
||||
{
|
||||
|
@ -859,8 +803,6 @@ class Response
|
|||
* @return \DateTime|null A DateTime instance or null if the header does not exist
|
||||
*
|
||||
* @throws \RuntimeException When the HTTP header is not parseable
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getLastModified()
|
||||
{
|
||||
|
@ -875,8 +817,6 @@ class Response
|
|||
* @param \DateTime|null $date A \DateTime instance or null to remove the header
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setLastModified(\DateTime $date = null)
|
||||
{
|
||||
|
@ -895,8 +835,6 @@ class Response
|
|||
* Returns the literal value of the ETag HTTP header.
|
||||
*
|
||||
* @return string|null The ETag HTTP header or null if it does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getEtag()
|
||||
{
|
||||
|
@ -910,8 +848,6 @@ class Response
|
|||
* @param bool $weak Whether you want a weak ETag or not
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setEtag($etag = null, $weak = false)
|
||||
{
|
||||
|
@ -938,8 +874,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCache(array $options)
|
||||
{
|
||||
|
@ -991,8 +925,6 @@ class Response
|
|||
* @return Response
|
||||
*
|
||||
* @see http://tools.ietf.org/html/rfc2616#section-10.3.5
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setNotModified()
|
||||
{
|
||||
|
@ -1011,8 +943,6 @@ class Response
|
|||
* Returns true if the response includes a Vary header.
|
||||
*
|
||||
* @return bool true if the response includes a Vary header, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function hasVary()
|
||||
{
|
||||
|
@ -1023,8 +953,6 @@ class Response
|
|||
* Returns an array of header names given in the Vary header.
|
||||
*
|
||||
* @return array An array of Vary names
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getVary()
|
||||
{
|
||||
|
@ -1047,8 +975,6 @@ class Response
|
|||
* @param bool $replace Whether to replace the actual value of not (true by default)
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setVary($headers, $replace = true)
|
||||
{
|
||||
|
@ -1067,8 +993,6 @@ class Response
|
|||
* @param Request $request A Request instance
|
||||
*
|
||||
* @return bool true if the Response validators match the Request, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isNotModified(Request $request)
|
||||
{
|
||||
|
@ -1100,8 +1024,6 @@ class Response
|
|||
* Is response invalid?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isInvalid()
|
||||
{
|
||||
|
@ -1112,8 +1034,6 @@ class Response
|
|||
* Is response informative?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isInformational()
|
||||
{
|
||||
|
@ -1124,8 +1044,6 @@ class Response
|
|||
* Is response successful?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isSuccessful()
|
||||
{
|
||||
|
@ -1136,8 +1054,6 @@ class Response
|
|||
* Is the response a redirect?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isRedirection()
|
||||
{
|
||||
|
@ -1148,8 +1064,6 @@ class Response
|
|||
* Is there a client error?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isClientError()
|
||||
{
|
||||
|
@ -1160,8 +1074,6 @@ class Response
|
|||
* Was there a server side error?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isServerError()
|
||||
{
|
||||
|
@ -1172,8 +1084,6 @@ class Response
|
|||
* Is the response OK?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isOk()
|
||||
{
|
||||
|
@ -1184,8 +1094,6 @@ class Response
|
|||
* Is the response forbidden?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isForbidden()
|
||||
{
|
||||
|
@ -1196,8 +1104,6 @@ class Response
|
|||
* Is the response a not found error?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isNotFound()
|
||||
{
|
||||
|
@ -1210,8 +1116,6 @@ class Response
|
|||
* @param string $location
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isRedirect($location = null)
|
||||
{
|
||||
|
@ -1222,8 +1126,6 @@ class Response
|
|||
* Is the response empty?
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function isEmpty()
|
||||
{
|
||||
|
|
|
@ -15,8 +15,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* ResponseHeaderBag is a container for Response HTTP headers.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class ResponseHeaderBag extends HeaderBag
|
||||
{
|
||||
|
@ -45,8 +43,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* Constructor.
|
||||
*
|
||||
* @param array $headers An array of HTTP headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct(array $headers = array())
|
||||
{
|
||||
|
@ -84,8 +80,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function replace(array $headers = array())
|
||||
{
|
||||
|
@ -100,8 +94,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($key, $values, $replace = true)
|
||||
{
|
||||
|
@ -121,8 +113,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
|
@ -156,8 +146,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* Sets a cookie.
|
||||
*
|
||||
* @param Cookie $cookie
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setCookie(Cookie $cookie)
|
||||
{
|
||||
|
@ -170,8 +158,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* @param string $name
|
||||
* @param string $path
|
||||
* @param string $domain
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function removeCookie($name, $path = '/', $domain = null)
|
||||
{
|
||||
|
@ -198,8 +184,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* @throws \InvalidArgumentException When the $format is invalid
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getCookies($format = self::COOKIES_FLAT)
|
||||
{
|
||||
|
@ -231,8 +215,6 @@ class ResponseHeaderBag extends HeaderBag
|
|||
* @param string $domain
|
||||
* @param bool $secure
|
||||
* @param bool $httpOnly
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clearCookie($name, $path = '/', $domain = null, $secure = false, $httpOnly = true)
|
||||
{
|
||||
|
|
|
@ -23,8 +23,6 @@ use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Drak <drak@zikula.org>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class Session implements SessionInterface, \IteratorAggregate, \Countable
|
||||
{
|
||||
|
|
|
@ -26,8 +26,6 @@ interface SessionInterface
|
|||
* @return bool True if session started.
|
||||
*
|
||||
* @throws \RuntimeException If session fails to start.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function start();
|
||||
|
||||
|
@ -35,8 +33,6 @@ interface SessionInterface
|
|||
* Returns the session ID.
|
||||
*
|
||||
* @return string The session ID.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getId();
|
||||
|
||||
|
@ -44,8 +40,6 @@ interface SessionInterface
|
|||
* Sets the session ID.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setId($id);
|
||||
|
||||
|
@ -53,8 +47,6 @@ interface SessionInterface
|
|||
* Returns the session name.
|
||||
*
|
||||
* @return mixed The session name.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
|
@ -62,8 +54,6 @@ interface SessionInterface
|
|||
* Sets the session name.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setName($name);
|
||||
|
||||
|
@ -79,8 +69,6 @@ interface SessionInterface
|
|||
* not a Unix timestamp.
|
||||
*
|
||||
* @return bool True if session invalidated, false if error.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function invalidate($lifetime = null);
|
||||
|
||||
|
@ -95,8 +83,6 @@ interface SessionInterface
|
|||
* not a Unix timestamp.
|
||||
*
|
||||
* @return bool True if session migrated, false if error.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function migrate($destroy = false, $lifetime = null);
|
||||
|
||||
|
@ -115,8 +101,6 @@ interface SessionInterface
|
|||
* @param string $name The attribute name
|
||||
*
|
||||
* @return bool true if the attribute is defined, false otherwise
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function has($name);
|
||||
|
||||
|
@ -127,8 +111,6 @@ interface SessionInterface
|
|||
* @param mixed $default The default value if not found.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function get($name, $default = null);
|
||||
|
||||
|
@ -137,8 +119,6 @@ interface SessionInterface
|
|||
*
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function set($name, $value);
|
||||
|
||||
|
@ -146,8 +126,6 @@ interface SessionInterface
|
|||
* Returns attributes.
|
||||
*
|
||||
* @return array Attributes
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function all();
|
||||
|
||||
|
@ -164,15 +142,11 @@ interface SessionInterface
|
|||
* @param string $name
|
||||
*
|
||||
* @return mixed The removed value or null when it does not exist
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function remove($name);
|
||||
|
||||
/**
|
||||
* Clears all attributes.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function clear();
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
|
|||
* Can be used in unit testing or in a situations where persisted sessions are not desired.
|
||||
*
|
||||
* @author Drak <drak@zikula.org>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class NullSessionHandler implements \SessionHandlerInterface
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
* ("auto_start", is not supported as it tells PHP to start a session before
|
||||
* PHP starts to execute user-land code. Setting during runtime has no effect).
|
||||
*
|
||||
* cache_limiter, "nocache" (use "0" to prevent headers from being sent entirely).
|
||||
* cache_limiter, "" (use "0" to prevent headers from being sent entirely).
|
||||
* cookie_domain, ""
|
||||
* cookie_httponly, ""
|
||||
* cookie_lifetime, "0"
|
||||
|
@ -195,6 +195,16 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
*/
|
||||
public function regenerate($destroy = false, $lifetime = null)
|
||||
{
|
||||
// Cannot regenerate the session ID for non-active sessions.
|
||||
if (PHP_VERSION_ID >= 50400 && \PHP_SESSION_ACTIVE !== session_status()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if session ID exists in PHP 5.3
|
||||
if (PHP_VERSION_ID < 50400 && '' === session_id()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (null !== $lifetime) {
|
||||
ini_set('session.cookie_lifetime', $lifetime);
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@ use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
|
|||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Drak <drak@zikula.org>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
interface SessionStorageInterface
|
||||
{
|
||||
|
@ -29,8 +27,6 @@ interface SessionStorageInterface
|
|||
* @throws \RuntimeException If something goes wrong starting the session.
|
||||
*
|
||||
* @return bool True if started.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function start();
|
||||
|
||||
|
@ -45,8 +41,6 @@ interface SessionStorageInterface
|
|||
* Returns the session ID.
|
||||
*
|
||||
* @return string The session ID or empty.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getId();
|
||||
|
||||
|
@ -54,8 +48,6 @@ interface SessionStorageInterface
|
|||
* Sets the session ID.
|
||||
*
|
||||
* @param string $id
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setId($id);
|
||||
|
||||
|
@ -63,8 +55,6 @@ interface SessionStorageInterface
|
|||
* Returns the session name.
|
||||
*
|
||||
* @return mixed The session name.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
|
@ -72,8 +62,6 @@ interface SessionStorageInterface
|
|||
* Sets the session name.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function setName($name);
|
||||
|
||||
|
@ -105,8 +93,6 @@ interface SessionStorageInterface
|
|||
* @return bool True if session regenerated, false if error
|
||||
*
|
||||
* @throws \RuntimeException If an error occurs while regenerating this storage
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function regenerate($destroy = false, $lifetime = null);
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@ namespace Symfony\Component\HttpFoundation;
|
|||
* @see flush()
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class StreamedResponse extends Response
|
||||
{
|
||||
|
@ -37,8 +35,6 @@ class StreamedResponse extends Response
|
|||
* @param callable|null $callback A valid PHP callback or null to set it later
|
||||
* @param int $status The response status code
|
||||
* @param array $headers An array of response headers
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function __construct($callback = null, $status = 200, $headers = array())
|
||||
{
|
||||
|
|
1
vendor/symfony/http-foundation/composer.json
vendored
1
vendor/symfony/http-foundation/composer.json
vendored
|
@ -19,7 +19,6 @@
|
|||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/phpunit-bridge": "~2.7",
|
||||
"symfony/expression-language": "~2.4"
|
||||
},
|
||||
"autoload": {
|
||||
|
|
Reference in a new issue