WordPress\AiClient\Tools\DTO
FunctionResponse::__construct
Constructor.
Method of the class: FunctionResponse{}
No Hooks.
Returns
null. Nothing (null).
Usage
$FunctionResponse = new FunctionResponse(); $FunctionResponse->__construct( ?string $id, ?string $name, $response );
- ?string $id(required)
- .
- ?string $name(required)
- .
- $response(mixed) (required)
- The response data from the function.
Changelog
| Since 0.1.0 | Introduced. |
FunctionResponse::__construct() FunctionResponse:: construct code WP 7.0.2
public function __construct(?string $id, ?string $name, $response)
{
if ($id === null && $name === null) {
throw new InvalidArgumentException('At least one of id or name must be provided.');
}
$this->id = $id;
$this->name = $name;
$this->response = $response;
}