WordPress\AiClientDependencies\Psr\Http\Message

ResponseFactoryInterface::createResponse │ public │ WP 1.0

Create a new response.

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

Хуков нет.

Возвращает

ResponseInterface.

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

$ResponseFactoryInterface = new ResponseFactoryInterface();
$ResponseFactoryInterface->createResponse( $code, $reasonPhrase ): ResponseInterface;
$code(int)
HTTP status code; defaults to 200.
По умолчанию: 200
$reasonPhrase(строка)
Reason phrase to associate with status code
php in generated response; if none is provided implementations MAY use the defaults as suggested in the HTTP specification. .
По умолчанию: ''

Код ResponseFactoryInterface::createResponse() WP 7.1.2

public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface;