Class SimpleHttpHeaders

Description

Collection of header lines in the response.

Located in /http.php (line 296)


	
			
Method Summary
 SimpleHttpHeaders __construct (string $headers)
 string getAuthentication ()
 integer getHttpVersion ()
 string getLocation ()
 string getMimeType ()
 string getRaw ()
 string getRealm ()
 integer getResponseCode ()
 boolean isChallenge ()
 boolean isRedirect ()
 SimpleCookie parseCookie (string $cookie_line)
 void parseHeaderLine (string $header_line)
Methods
Constructor __construct (line 311)

Parses the incoming header block.

  • access: public
SimpleHttpHeaders __construct (string $headers)
  • string $headers: Header block.
getAuthentication (line 398)

Accessor for authentication type.

  • return: Type.
  • access: public
string getAuthentication ()
getHttpVersion (line 330)

Accessor for parsed HTTP protocol version.

  • return: HTTP error code.
  • access: public
integer getHttpVersion ()
getLocation (line 358)

Returns the redirected URL or false if no redirection.

  • return: URL or false for none.
  • access: public
string getLocation ()
getMimeType (line 389)

Accessor for MIME type header information.

  • return: MIME type.
  • access: public
string getMimeType ()
getRaw (line 339)

Accessor for raw header block.

  • return: All headers as raw string.
  • access: public
string getRaw ()
getRealm (line 407)

Accessor for security realm.

  • return: Realm.
  • access: public
string getRealm ()
getResponseCode (line 348)

Accessor for parsed HTTP error code.

  • return: HTTP error code.
  • access: public
integer getResponseCode ()
isChallenge (line 378)

Test to see if the response is an authentication challenge.

  • return: True if challenge.
  • access: public
boolean isChallenge ()
isRedirect (line 367)

Test to see if the response is a valid redirect.

  • return: True if valid redirect.
  • access: public
boolean isRedirect ()
parseCookie (line 460)

Parse the Set-cookie content.

  • return: New cookie object.
  • access: protected
SimpleCookie parseCookie (string $cookie_line)
  • string $cookie_line: Text after "Set-cookie:"
parseHeaderLine (line 434)

Called on each header line to accumulate the held data within the class.

  • access: protected
void parseHeaderLine (string $header_line)
  • string $header_line: One line of header.
writeCookiesToJar (line 417)

Writes new cookies to the cookie jar.

  • access: public
void writeCookiesToJar (SimpleCookieJar $jar, SimpleUrl $url)

Documentation generated on Sun, 31 Oct 2010 16:31:38 -0500 by phpDocumentor 1.4.3