PHP 클래스 Httpful\Response

저자: Nate Good ([email protected])
파일 보기 프로젝트 열기: nategood/httpful 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$body
$charset
$code
$content_type
$headers
$is_mime_personal
$is_mime_vendor_specific
$meta_data
$parent_type
$raw_body
$raw_headers
$request

공개 메소드들

메소드 설명
__construct ( string $body, string $headers, httpful\Request $request, array $meta_data = [] )
__toString ( ) : string
_interpretHeaders ( ) After we've parse the headers, let's clean things up a bit and treat some headers specially
_parse ( $body ) : array | string | object Parse the response into a clean data structure (most often an associative array) based on the expected Mime type.
_parseCode ( $headers )
_parseHeaders ( string $headers ) : array Parse text headers from response into array of key value pairs
hasBody ( ) : boolean
hasErrors ( ) : boolean Status Code Definitions

메소드 상세

__construct() 공개 메소드

public __construct ( string $body, string $headers, httpful\Request $request, array $meta_data = [] )
$body string
$headers string
$request httpful\Request
$meta_data array

__toString() 공개 메소드

public __toString ( ) : string
리턴 string

_interpretHeaders() 공개 메소드

After we've parse the headers, let's clean things up a bit and treat some headers specially
public _interpretHeaders ( )

_parse() 공개 메소드

Parse the response into a clean data structure (most often an associative array) based on the expected Mime type.
public _parse ( $body ) : array | string | object
리턴 array | string | object the response parse accordingly

_parseCode() 공개 메소드

public _parseCode ( $headers )

_parseHeaders() 공개 메소드

Parse text headers from response into array of key value pairs
public _parseHeaders ( string $headers ) : array
$headers string raw headers
리턴 array parse headers

hasBody() 공개 메소드

public hasBody ( ) : boolean
리턴 boolean

hasErrors() 공개 메소드

Informational 1xx Successful 2xx Redirection 3xx Client Error 4xx Server Error 5xx http://pretty-rfc.herokuapp.com/RFC2616#status.codes
public hasErrors ( ) : boolean
리턴 boolean Did we receive a 4xx or 5xx?

프로퍼티 상세

$body 공개적으로 프로퍼티

public $body

$charset 공개적으로 프로퍼티

public $charset

$code 공개적으로 프로퍼티

public $code

$content_type 공개적으로 프로퍼티

public $content_type

$headers 공개적으로 프로퍼티

public $headers

$is_mime_personal 공개적으로 프로퍼티

public $is_mime_personal

$is_mime_vendor_specific 공개적으로 프로퍼티

public $is_mime_vendor_specific

$meta_data 공개적으로 프로퍼티

public $meta_data

$parent_type 공개적으로 프로퍼티

public $parent_type

$raw_body 공개적으로 프로퍼티

public $raw_body

$raw_headers 공개적으로 프로퍼티

public $raw_headers

$request 공개적으로 프로퍼티

public $request