WordPress\AiClient\Tools\DTO
FunctionCall::toArray
{@inheritDoc}
Method of the class: FunctionCall{}
No Hooks.
Returns
FunctionCallArrayShape.
Usage
$FunctionCall = new FunctionCall(); $FunctionCall->toArray(): array;
Changelog
| Since 0.1.0 | Introduced. |
FunctionCall::toArray() FunctionCall::toArray code WP 7.0
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;
}
if ($this->args !== null) {
$data[self::KEY_ARGS] = $this->args;
}
return $data;
}