Object describing an API-Problem payload

 Methods

Constructor

__construct(int $status, string $detail, string $describedBy, string $title, array $additional) 

Create an instance using the provided information. If nothing is provided for the describedBy field, the class default will be used; if the status matches any known, the title field will be selected from $problemStatusTitles as a result.

Parameters

$status

int

$detail

string

$describedBy

string

$title

string

$additional

Retrieve properties

__get(string $name) : mixed

Parameters

$name

string

Returns

mixed

Set the flag indicating whether an exception detail should include a stack trace and previous exception information.

setDetailIncludesStackTrace(bool $flag) : \PhlyRestfully\ApiProblem

Parameters

$flag

bool

Returns

Cast to an array

toArray() : array

Returns

array