name : ResponseFactory.php
<?php

declare(strict_types=1);

namespace Laminas\Diactoros;

use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;

class ResponseFactory implements ResponseFactoryInterface
{
    /**
     * {@inheritDoc}
     */
    public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
    {
        return (new Response())
            ->withStatus($code, $reasonPhrase);
    }
}

© 2025 UnknownSec
A-Z Web Programming | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar
A-Z Web Programming

A-Z Web Programming

in Web Development
4.75
(1 Ratings)
Created by Linda Anderson

Share

Share course with your friends

Buy with points