summaryrefslogtreecommitdiff
path: root/src/Diactoros/ServerRequestFactory.php
blob: 6a42f2078e6768db1e4a7b84ff5169b0b7ba9709 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

/**
 * High-performance PHP process supervisor and load balancer written in Go
 *
 * @author Wolfy-J
 */
declare(strict_types=1);

namespace Spiral\RoadRunner\Diactoros;

use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\ServerRequestInterface;
use Laminas\Diactoros\ServerRequest;

final class ServerRequestFactory implements ServerRequestFactoryInterface
{
    /**
     * @inheritdoc
     *
     * @param array<mixed> $serverParams Array of SAPI parameters with which to seed the generated request instance.
     */
    public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
    {
        $uploadedFiles = [];
        return new ServerRequest($serverParams, $uploadedFiles, $uri, $method);
    }
}