PHP Class Ergo\Http\HeaderField

Specifically, one of: General Header {@link http://tools.ietf.org/html/rfc2616#section-4.5} Request Header {@link http://tools.ietf.org/html/rfc2616#section-5.3} Response Header {@link http://tools.ietf.org/html/rfc2616#section-6.2} Entity Header {http://tools.ietf.org/html/rfc2616#section-7.1} All follow the general format given in Section 3.1 of RFC 822. {@link http://tools.ietf.org/html/rfc822#section-3.1}
See also: http://github.com/pda/phool
Author: Paul Annesley ([email protected])
Show file Open project: 99designs/ergo Class Usage Examples

Public Methods

Method Description
__construct ( string $name, string $value )
__toString ( ) : string The full header string, e.g. 'Example-Header: Some Value'
fromString ( string $headerString ) Creates a header from a string representing a single header.
getName ( ) : string The case-normalized name of the header.
getValue ( ) : string The value of the header.

Method Details

__construct() public method

public __construct ( string $name, string $value )
$name string
$value string

__toString() public method

The full header string, e.g. 'Example-Header: Some Value'
public __toString ( ) : string
return string

fromString() public static method

Creates a header from a string representing a single header.
public static fromString ( string $headerString )
$headerString string

getName() public method

The case-normalized name of the header.
public getName ( ) : string
return string

getValue() public method

The value of the header.
public getValue ( ) : string
return string