Documentation

ApiResponse
in package

FIXME Support streams

Tags
see
http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-7/php/pear/Mail/mimeDecode.php
see
https://github.com/php-mime-mail-parser/php-mime-mail-parser

Table of Contents

Properties

$_jsonAsArray  : array<string|int, mixed>
$_jsonAsObject  : stdClass
$_multiparts  : array<string|int, ApiResponse>
$_request  : RequestInterface
$_response  : ResponseInterface

Methods

__construct()  : mixed
TODO Support strams
body()  : StreamInterface
createResponse()  : mixed
error()  : string
Returns a meaningful error message
json()  : stdClass
Parses response body as JSON Result is cached internally
jsonArray()  : array<string|int, mixed>
Parses response body as JSON and returns an array Result is cached internally
multipart()  : array<string|int, ApiResponse>
Parses multipart response body as an array of ApiResponse objects
ok()  : bool
raw()  : mixed
request()  : RequestInterface
response()  : ResponseInterface
text()  : string
getContentType()  : mixed
isContentType()  : mixed

Properties

$_jsonAsArray

protected array<string|int, mixed> $_jsonAsArray

Methods

createResponse()

public static createResponse([mixed $body = '' ][, mixed $status = 200 ]) : mixed
Parameters
$body : mixed = ''
$status : mixed = 200

error()

Returns a meaningful error message

public error() : string
Return values
string

json()

Parses response body as JSON Result is cached internally

public json() : stdClass
Tags
throws
Exception
Return values
stdClass

jsonArray()

Parses response body as JSON and returns an array Result is cached internally

public jsonArray() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

multipart()

Parses multipart response body as an array of ApiResponse objects

public multipart() : array<string|int, ApiResponse>
Tags
throws
Exception
Return values
array<string|int, ApiResponse>

getContentType()

protected getContentType() : mixed

isContentType()

protected isContentType(mixed $type) : mixed
Parameters
$type : mixed

        
On this page

Search results