The Response component is in charge of handling responses.
# 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(code: 0);
# Status codes
uuid method is used to access to the Response UUID (opens new window).
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.