PHP 클래스 Phergie_Plugin_Http_Response, phergie

저자: Phergie Development Team ([email protected])
파일 보기 프로젝트 열기: phergie/phergie 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$code string HTTP response code or 0 if no HTTP response was received
$codeStrings array HTTP response strings
$content mixed Content of the response body, decoded for supported content types
$headers array Associative array mapping response header names to their values
$message string Description of the HTTP response code or the error message if no HTTP response was received
$meta array Associative array containing other metadata about the response

공개 메소드들

메소드 설명
getCode ( ) : string Returns the HTTP response code.
getCodeAsString ( ) : string Returns the HTTP response code text.
getContent ( ) : mixed Returns the content of the response body.
getHeaders ( string $name = null ) : array | string Returns all response headers or the value of a single specified response header.
getMessage ( ) : string Returns the HTTP response description.
getMeta ( string $name = null ) : array | string | null Returns all metadata or the value of a single specified metadatum.
isError ( ) : boolean Returns whether the response indicates a client- or server-side error.
setCode ( string $code ) : Phergie_Plugin_Http_Response Sets the HTTP response code.
setContent ( mixed $content ) : Phergie_Plugin_Http_Response Sets the content of the response body.
setHeaders ( array $headers ) : Phergie_Plugin_Http_Response Sets the response headers.
setMessage ( string $message ) : Phergie_Plugin_Http_Response Sets the HTTP response description.
setMeta ( array $meta ) : Phergie_Plugin_Http_Response Sets the response metadata.

메소드 상세

getCode() 공개 메소드

Returns the HTTP response code.
public getCode ( ) : string
리턴 string Response code

getCodeAsString() 공개 메소드

Returns the HTTP response code text.
public getCodeAsString ( ) : string
리턴 string Response code text

getContent() 공개 메소드

Returns the content of the response body.
public getContent ( ) : mixed
리턴 mixed Response body content, decoded for supported content types

getHeaders() 공개 메소드

Returns all response headers or the value of a single specified response header.
public getHeaders ( string $name = null ) : array | string
$name string Optional name of a single header for which the associated value should be returned
리턴 array | string Associative array of all header values, a string containing the value of the header indicated by $name if one is set, or null if one is not

getMessage() 공개 메소드

Returns the HTTP response description.
public getMessage ( ) : string
리턴 string

getMeta() 공개 메소드

Returns all metadata or the value of a single specified metadatum.
public getMeta ( string $name = null ) : array | string | null
$name string Optional name of a single metadatum for which the associated value should be returned
리턴 array | string | null Associative array of all metadata values, a string containing the value of the metadatum indicated by $name if one is set, or null if one is not

isError() 공개 메소드

Returns whether the response indicates a client- or server-side error.
public isError ( ) : boolean
리턴 boolean TRUE if the response indicates an error, FALSE otherwise

setCode() 공개 메소드

Sets the HTTP response code.
public setCode ( string $code ) : Phergie_Plugin_Http_Response
$code string Response code
리턴 Phergie_Plugin_Http_Response Provides a fluent interface

setContent() 공개 메소드

Sets the content of the response body.
public setContent ( mixed $content ) : Phergie_Plugin_Http_Response
$content mixed Response body content
리턴 Phergie_Plugin_Http_Response Provides a fluent interface

setHeaders() 공개 메소드

Sets the response headers.
public setHeaders ( array $headers ) : Phergie_Plugin_Http_Response
$headers array Associative array of response headers indexed by header name
리턴 Phergie_Plugin_Http_Response Provides a fluent interface

setMessage() 공개 메소드

Sets the HTTP response description.
public setMessage ( string $message ) : Phergie_Plugin_Http_Response
$message string Response description
리턴 Phergie_Plugin_Http_Response Provides a fluent interface

setMeta() 공개 메소드

Sets the response metadata.
public setMeta ( array $meta ) : Phergie_Plugin_Http_Response
$meta array Associative array of response metadata
리턴 Phergie_Plugin_Http_Response Provides a fluent interface

프로퍼티 상세

$code 보호되어 있는 프로퍼티

HTTP response code or 0 if no HTTP response was received
protected string $code
리턴 string

$codeStrings 보호되어 있는 정적으로 프로퍼티

HTTP response strings
protected static array $codeStrings
리턴 array

$content 보호되어 있는 프로퍼티

Content of the response body, decoded for supported content types
protected mixed $content
리턴 mixed

$headers 보호되어 있는 프로퍼티

Associative array mapping response header names to their values
protected array $headers
리턴 array

$message 보호되어 있는 프로퍼티

Description of the HTTP response code or the error message if no HTTP response was received
protected string $message
리턴 string

$meta 보호되어 있는 프로퍼티

Associative array containing other metadata about the response
protected array $meta
리턴 array