FunctionResponse::toArray(): WordPressAiClientToolsDTOFunctionResponseArrayShape

In this article

{@inheritDoc}

Return

WordPressAiClientToolsDTOFunctionResponseArrayShape

Source

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;
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.