Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ResponseFactoryInterface.php

function ResponseFactoryInterface::createResponse

Create a new response.

Parameters

int $code HTTP status code; defaults to 200:

string $reasonPhrase Reason phrase to associate with status code: in generated response; if none is provided implementations MAY use the defaults as suggested in the HTTP specification.

Return value

ResponseInterface

2 methods override ResponseFactoryInterface::createResponse()
HttpFactory::createResponse in vendor/guzzlehttp/psr7/src/HttpFactory.php
Create a new response.
Psr17Factory::createResponse in vendor/php-http/discovery/src/Psr17Factory.php
Create a new response.

File

vendor/psr/http-factory/src/ResponseFactoryInterface.php, line 17

Class

ResponseFactoryInterface

Namespace

Psr\Http\Message

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal