WordPress\AiClient\Tools\DTO

FunctionResponse::__constructpublicWP 0.1.0

Constructor.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$FunctionResponse = new FunctionResponse();
$FunctionResponse->__construct( ?string $id, ?string $name, $response );
?string $id(обязательный)
.
?string $name(обязательный)
.
$response(разное) (обязательный)
The response data from the function.

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

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

Код FunctionResponse::__construct() WP 7.0.4

public function __construct(?string $id, ?string $name, $response)
{
    if ($id === null && $name === null) {
        throw new InvalidArgumentException('At least one of id or name must be provided.');
    }
    $this->id = $id;
    $this->name = $name;
    $this->response = $response;
}