function ServerRequestCreatorInterface::fromGlobals
Create a new server request from the current environment variables. Defaults to a GET request to minimise the risk of an \InvalidArgumentException. Includes the current request headers as supplied by the server through `getallheaders()`. If `getallheaders()` is unavailable on the current server it will fallback to its own `getHeadersFromServer()` method. Defaults to php://input for the request body.
Throws
\InvalidArgumentException if no valid method or URI can be determined
1 method overrides ServerRequestCreatorInterface::fromGlobals()
- ServerRequestCreator::fromGlobals in vendor/
nyholm/ psr7-server/ src/ ServerRequestCreator.php - Create a new server request from the current environment variables. Defaults to a GET request to minimise the risk of an \InvalidArgumentException. Includes the current request headers as supplied by the server through `getallheaders()`. If…
File
-
vendor/
nyholm/ psr7-server/ src/ ServerRequestCreatorInterface.php, line 25
Class
- ServerRequestCreatorInterface
- @author Tobias Nyholm <tobias.nyholm@gmail.com> @author Martijn van der Ven <martijn@vanderven.se>
Namespace
Nyholm\Psr7ServerCode
public function fromGlobals() : ServerRequestInterface;