[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ -> HeaderBag.php (summary)

(no description)

File Size: 326 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HeaderBag:: (20 methods):
  __construct()
  __toString()
  all()
  keys()
  replace()
  add()
  get()
  set()
  has()
  contains()
  remove()
  getDate()
  addCacheControlDirective()
  hasCacheControlDirective()
  getCacheControlDirective()
  removeCacheControlDirective()
  getIterator()
  count()
  getCacheControlHeader()
  parseCacheControl()


Class: HeaderBag  - X-Ref

HeaderBag is a container for HTTP headers.

__construct(array $headers = array()   X-Ref
Constructor.

param: array $headers An array of HTTP headers

__toString()   X-Ref
Returns the headers as a string.

return: string The headers

all()   X-Ref
Returns the headers.

return: array An array of headers

keys()   X-Ref
Returns the parameter keys.

return: array An array of parameter keys

replace(array $headers = array()   X-Ref
Replaces the current HTTP headers by a new set.

param: array $headers An array of HTTP headers

add(array $headers)   X-Ref
Adds new headers the current HTTP headers set.

param: array $headers An array of HTTP headers

get($key, $default = null, $first = true)   X-Ref
Returns a header value by name.

param: string $key     The header name
param: mixed  $default The default value
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

set($key, $values, $replace = true)   X-Ref
Sets a header by name.

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)

has($key)   X-Ref
Returns true if the HTTP header is defined.

param: string $key The HTTP header
return: bool true if the parameter exists, false otherwise

contains($key, $value)   X-Ref
Returns true if the given HTTP header contains the given value.

param: string $key   The HTTP header name
param: string $value The HTTP value
return: bool true if the value is contained in the header, false otherwise

remove($key)   X-Ref
Removes a header.

param: string $key The HTTP header name

getDate($key, \DateTime $default = null)   X-Ref
Returns the HTTP header value converted to a date.

param: string    $key     The parameter key
param: \DateTime $default The default value
return: null|\DateTime The parsed DateTime or the default value if the header does not exist

addCacheControlDirective($key, $value = true)   X-Ref
Adds a custom Cache-Control directive.

param: string $key   The Cache-Control directive name
param: mixed  $value The Cache-Control directive value

hasCacheControlDirective($key)   X-Ref
Returns true if the Cache-Control directive is defined.

param: string $key The Cache-Control directive
return: bool true if the directive exists, false otherwise

getCacheControlDirective($key)   X-Ref
Returns a Cache-Control directive value by name.

param: string $key The directive name
return: mixed|null The directive value if defined, null otherwise

removeCacheControlDirective($key)   X-Ref
Removes a Cache-Control directive.

param: string $key The Cache-Control directive

getIterator()   X-Ref
Returns an iterator for headers.

return: \ArrayIterator An \ArrayIterator instance

count()   X-Ref
Returns the number of headers.

return: int The number of headers

getCacheControlHeader()   X-Ref
No description

parseCacheControl($header)   X-Ref
Parses a Cache-Control HTTP header.

param: string $header The value of the Cache-Control HTTP header
return: array An array representing the attribute values



Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1