Method | Description | |
---|---|---|
__construct ( string $headers ) | Parses the incoming header block. | |
getAuthentication ( ) : string | Accessor for authentication type. | |
getHttpVersion ( ) : integer | Accessor for parsed HTTP protocol version. | |
getLocation ( ) : string | Returns the redirected URL or false if no redirection. | |
getMimeType ( ) : string | Accessor for MIME type header information. | |
getRaw ( ) : string | Accessor for raw header block. | |
getRealm ( ) : string | Accessor for security realm. | |
getResponseCode ( ) : integer | Accessor for parsed HTTP error code. | |
isChallenge ( ) : boolean | Test to see if the response is an authentication challenge. | |
isRedirect ( ) : boolean | Test to see if the response is a valid redirect. | |
writeCookiesToJar ( SimpleCookieJar $jar, SimpleUrl $url ) | Writes new cookies to the cookie jar. |
Method | Description | |
---|---|---|
parseCookie ( string $cookie_line ) : SimpleCookie | Parse the Set-cookie content. | |
parseHeaderLine ( string $header_line ) | Called on each header line to accumulate the held data within the class. |
public __construct ( string $headers ) | ||
$headers | string | Header block. |
public getAuthentication ( ) : string | ||
return | string | Type. |
public getHttpVersion ( ) : integer | ||
return | integer | HTTP error code. |
public getLocation ( ) : string | ||
return | string | URL or false for none. |
public getMimeType ( ) : string | ||
return | string | MIME type. |
public getResponseCode ( ) : integer | ||
return | integer | HTTP error code. |
public isChallenge ( ) : boolean | ||
return | boolean | True if challenge. |
public isRedirect ( ) : boolean | ||
return | boolean | True if valid redirect. |
protected parseCookie ( string $cookie_line ) : SimpleCookie | ||
$cookie_line | string | Text after "Set-cookie:" |
return | SimpleCookie | New cookie object. |
protected parseHeaderLine ( string $header_line ) | ||
$header_line | string | One line of header. |
public writeCookiesToJar ( SimpleCookieJar $jar, SimpleUrl $url ) | ||
$jar | SimpleCookieJar | Jar to write to. |
$url | SimpleUrl | Host and path to write under. |