WordPress\AiClient\Tools\DTO
FunctionResponse::toArray
{@inheritDoc}
Method of the class: FunctionResponse{}
No Hooks.
Returns
FunctionResponseArrayShape.
Usage
$FunctionResponse = new FunctionResponse(); $FunctionResponse->toArray(): array;
Changelog
| Since 0.1.0 | Introduced. |
FunctionResponse::toArray() FunctionResponse::toArray code WP 7.0.2
public function toArray(): array
{
$data = [];
if ($this->id !== null) {
$data[self::KEY_ID] = $this->id;
}
if ($this->name !== null) {
$data[self::KEY_NAME] = $this->name;
}
$data[self::KEY_RESPONSE] = $this->response;
return $data;
}