WordPress\AiClient\Tools\DTO

FunctionResponse::fromArraypublic staticWP 0.1.0

{@inheritDoc}

Method of the class: FunctionResponse{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = FunctionResponse::fromArray( $array ): self;
$array(array) (required)
.

Changelog

Since 0.1.0 Introduced.

FunctionResponse::fromArray() code WP 7.0.2

public static function fromArray(array $array): self
{
    static::validateFromArrayData($array, [self::KEY_RESPONSE]);
    return new self($array[self::KEY_ID] ?? null, $array[self::KEY_NAME] ?? null, $array[self::KEY_RESPONSE]);
}