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
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
Namespace
Psr\Http\MessageCode
public function createResponse(int $code = 200, string $reasonPhrase = '') : ResponseInterface;