Message
class Message implements Serializable, JsonSerializable
Message class.
This class is a representation of a log message which contains API-related information and can easily be serialized.
Methods
Constructor.
Creates a new instance of the class from a JSON string.
No description
No description
No description
No description
The duration in microseconds.
No description
True if the requests threw an error.
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
Returns a string representation of the current message.
No description
No description
No description
Details
at line 55
__construct(string $api, float $duration, RequestInterface $request, ResponseInterface $response = null, Exception $exception = null)
Constructor.
at line 76
static
createFromString(string $json)
Creates a new instance of the class from a JSON string.
at line 99
getLogLevel()
at line 106
getApi()
at line 111
getRequest()
at line 119
Exception|null
getException()
at line 127
getDuration()
The duration in microseconds.
at line 135
ResponseInterface|null
getResponse()
at line 143
isError()
True if the requests threw an error.
at line 162
jsonSerialize()
{@inheritdoc}
at line 170
serialize()
{@inheritdoc}
at line 178
unserialize($serialized)
{@inheritdoc}
at line 192
asString()
Returns a string representation of the current message.