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
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()
|
||||
{
|
||||
|
|
Reference in a new issue