WordPress\AiClient\Tools\DTO

FunctionDeclaration::toArraypublicWP 0.1.0

{@inheritDoc}

Method of the class: FunctionDeclaration{}

No Hooks.

Returns

FunctionDeclarationArrayShape.

Usage

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

Changelog

Since 0.1.0 Introduced.

FunctionDeclaration::toArray() code WP 7.0

public function toArray(): array
{
    $data = [self::KEY_NAME => $this->name, self::KEY_DESCRIPTION => $this->description];
    if ($this->parameters !== null) {
        $data[self::KEY_PARAMETERS] = $this->parameters;
    }
    return $data;
}