메소드 |
설명 |
|
__construct ( array $headers = [] ) |
Constructor. |
|
__toString ( ) : string |
Returns the headers as a string. |
|
add ( array $headers ) |
Adds new headers the current HTTP headers set. |
|
addCacheControlDirective ( string $key, mixed $value = true ) |
Adds a custom Cache-Control directive. |
|
all ( ) : array |
Returns the headers. |
|
contains ( string $key, string $value ) : boolean |
Returns true if the given HTTP header contains the given value. |
|
count ( ) : integer |
Returns the number of headers. |
|
get ( string $key, mixed $default = null, boolean $first = true ) : string | array |
Returns a header value by name. |
|
getCacheControlDirective ( string $key ) : mixed | null |
Returns a Cache-Control directive value by name. |
|
getDate ( string $key, DateTime $default = null ) : null | DateTime |
Returns the HTTP header value converted to a date. |
|
getIterator ( ) : ArrayIterator |
Returns an iterator for headers. |
|
has ( string $key ) : boolean |
Returns true if the HTTP header is defined. |
|
hasCacheControlDirective ( string $key ) : boolean |
Returns true if the Cache-Control directive is defined. |
|
keys ( ) : array |
Returns the parameter keys. |
|
remove ( string $key ) |
Removes a header. |
|
removeCacheControlDirective ( string $key ) |
Removes a Cache-Control directive. |
|
replace ( array $headers = [] ) |
Replaces the current HTTP headers by a new set. |
|
set ( string $key, string | array $values, boolean $replace = true ) |
Sets a header by name. |
|