The Response component is in charge of handling responses.
ResponseInterface describes the interface for the component in charge of defining a Response.
# Creating Response
use Chevere\Components\Response\Response; $response = new Response();
# With data
withData method is used to set Response data.
/** * @var mixed $foo * @var mixed $bar */ $response = $response ->withData(foo: $foo, bar: $bar);
# With status
withStatus method is used to set Response status code.
$response = $response->withStatus(0);
# Status codes
uuid method is used to access to the Response UUID.
token method is used to access to the Response token.
data method is used to access to the Response data.
status method is used to access to the Response status.