The Response component is in charge of providing a common response interface.
# Creating Response
Create a response by passing named data.
use Chevere\Response\Response; $response = new Response( key: 'value', user: 'rodo', );
# With data
withData method is used to set the Response data.
$response = $response ->withData(foo: $foo, bar: $bar);
# With code
withCode method is used to set Response code.
$response = $response->withCode(code: 0);
# Response codes
uuid method is used to access to the Response UUID (opens new window) (V4)
$string = $response->uuid();
token method is used to access to the Response token
$tstring = $response->token();
data method is used to access to the Response data
$array = $response->data();
code method is used to access to the Response code
$integer = $response->code();