WordPress\AiClient\Tools\DTO

FunctionCall::toArray │ public │ WP 0.1.0

{@inheritDoc}

Метод класса: FunctionCall{}

Хуков нет.

Возвращает

FunctionCallArrayShape.

Использование

$FunctionCall = new FunctionCall();
$FunctionCall->toArray(): array;

Список изменений

С версии 0.1.0 Введена.

Код FunctionCall::toArray() WP 7.1.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;
    }
    if ($this->args !== null) {
        $data[self::KEY_ARGS] = $this->args;
    }
    return $data;
}