WordPress\AiClient\Tools\DTO
FunctionResponse::toArray
{@inheritDoc}
Метод класса: FunctionResponse{}
Хуков нет.
Возвращает
FunctionResponseArrayShape.
Использование
$FunctionResponse = new FunctionResponse(); $FunctionResponse->toArray(): array;
Список изменений
| С версии 0.1.0 | Введена. |
Код FunctionResponse::toArray() FunctionResponse::toArray WP 7.0.4
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;
}