PHP Класс Httpful\Response

Автор: Nate Good ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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