27 lines
512 B
PHP
27 lines
512 B
PHP
<?php
|
|
|
|
namespace php;
|
|
|
|
|
|
/**
|
|
* A response from the server to a request.
|
|
*/
|
|
class Response
|
|
{
|
|
/**
|
|
* @var mixed The server's main payload, or the error message if the request could not be satisfied.
|
|
*/
|
|
public mixed $message;
|
|
/**
|
|
* @var bool `true` if and only if the request was fully completed.
|
|
*/
|
|
public bool $satisfied;
|
|
|
|
|
|
public function __construct(mixed $message, bool $satisfied)
|
|
{
|
|
$this->message = $message;
|
|
$this->satisfied = $satisfied;
|
|
}
|
|
}
|