WordPress\AiClient\Providers\Http\DTO
Response::toArray
{@inheritDoc}
Метод класса: Response{}
Хуков нет.
Возвращает
ResponseArrayShape.
Использование
$Response = new Response(); $Response->toArray(): array;
Список изменений
| С версии 0.1.0 | Введена. |
Код Response::toArray() Response::toArray WP 7.1.2
public function toArray(): array
{
$data = [self::KEY_STATUS_CODE => $this->statusCode, self::KEY_HEADERS => $this->headers->getAll()];
if ($this->body !== null) {
$data[self::KEY_BODY] = $this->body;
}
return $data;
}