Symfony\Component\HttpFoundation\HeaderBag
HeaderBag is a container for HTTP headers.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class HeaderBag
implements
IteratorAggregate,Countable
{
- // members
- protected $headers;
- protected $cacheControl;
- // methods
- public void __construct()
- public string __toString()
- public array all()
- public array keys()
- public void replace()
- public void add()
- public string|array get()
- public void set()
- public Boolean has()
- public Boolean contains()
- public void remove()
- public DateTime getDate()
- public void addCacheControlDirective()
- public void hasCacheControlDirective()
- public void getCacheControlDirective()
- public void removeCacheControlDirective()
- public ArrayIterator getIterator()
- public int count()
- protected void getCacheControlHeader()
- protected array parseCacheControl()
Hierarchy
Extended by
Implements
Members
protected
- $cacheControl
- $headers
Methods
protected
- getCacheControlHeader()
- parseCacheControl() — Parses a Cache-Control HTTP header.
public
- __construct() — Constructor.
- __toString() — Returns the headers as a string.
- add() — Adds new headers the current HTTP headers set.
- addCacheControlDirective()
- all() — Returns the headers.
- contains() — Returns true if the given HTTP header contains the given value.
- count() — Returns the number of headers.
- get() — Returns a header value by name.
- getCacheControlDirective()
- getDate() — Returns the HTTP header value converted to a date.
- getIterator() — Returns an iterator for headers.
- has() — Returns true if the HTTP header is defined.
- hasCacheControlDirective()
- keys() — Returns the parameter keys.
- remove() — Removes a header.
- removeCacheControlDirective()
- replace() — Replaces the current HTTP headers by a new set.
- set() — Sets a header by name.