WordPress\AiClient\Tools\DTO

FunctionCall::toArraypublicWP 0.1.0

{@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() 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;
}