for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace DMT\Aura\Psr\Factory;
use DMT\Aura\Psr\Message\ServerRequest;
use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UriInterface;
/**
* Class ServerRequestFactory
*
* @package DMT\Aura\Psr\Factory
*/
class ServerRequestFactory implements ServerRequestFactoryInterface
{
* Create a new server request.
* Note that server-params are taken precisely as given - no parsing/processing
* of the given values is performed, and, in particular, no attempt is made to
* determine the HTTP method or URI, which must be provided explicitly.
* @param string $method The HTTP method associated with the request.
* @param UriInterface|string $uri The URI associated with the request. If
* the value is a string, the factory MUST create a UriInterface
* instance based on it.
* @param array $serverParams Array of SAPI parameters with which to seed
* the generated request instance.
* @return ServerRequest|ServerRequestInterface
public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
return new ServerRequest($method, $uri, $serverParams);
}