PHP 클래스 SimpleHttpHeaders, simpletest

파일 보기 프로젝트 열기: simpletest/simpletest 1 사용 예제들

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
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.

메소드 상세

__construct() 공개 메소드

Parses the incoming header block.
public __construct ( string $headers )
$headers string Header block.

getAuthentication() 공개 메소드

Accessor for authentication type.
public getAuthentication ( ) : string
리턴 string Type.

getHttpVersion() 공개 메소드

Accessor for parsed HTTP protocol version.
public getHttpVersion ( ) : integer
리턴 integer HTTP error code.

getLocation() 공개 메소드

Returns the redirected URL or false if no redirection.
public getLocation ( ) : string
리턴 string URL or false for none.

getMimeType() 공개 메소드

Accessor for MIME type header information.
public getMimeType ( ) : string
리턴 string MIME type.

getRaw() 공개 메소드

Accessor for raw header block.
public getRaw ( ) : string
리턴 string All headers as raw string.

getRealm() 공개 메소드

Accessor for security realm.
public getRealm ( ) : string
리턴 string Realm.

getResponseCode() 공개 메소드

Accessor for parsed HTTP error code.
public getResponseCode ( ) : integer
리턴 integer HTTP error code.

isChallenge() 공개 메소드

Test to see if the response is an authentication challenge.
public isChallenge ( ) : boolean
리턴 boolean True if challenge.

isRedirect() 공개 메소드

Test to see if the response is a valid redirect.
public isRedirect ( ) : boolean
리턴 boolean True if valid redirect.

parseCookie() 보호된 메소드

Parse the Set-cookie content.
protected parseCookie ( string $cookie_line ) : SimpleCookie
$cookie_line string Text after "Set-cookie:"
리턴 SimpleCookie New cookie object.

parseHeaderLine() 보호된 메소드

Called on each header line to accumulate the held data within the class.
protected parseHeaderLine ( string $header_line )
$header_line string One line of header.

writeCookiesToJar() 공개 메소드

Writes new cookies to the cookie jar.
public writeCookiesToJar ( SimpleCookieJar $jar, SimpleUrl $url )
$jar SimpleCookieJar Jar to write to.
$url SimpleUrl Host and path to write under.