Factory for making ServerRequest instances.
This subclass adds in CakePHP specific behavior to populate the basePath and webroot attributes. Furthermore the Uri's path is corrected to only contain the 'virtual' path for the request.
createUri( array $server [] )
Create a new Uri instance from the provided server data.
$server
optional [] Array of server data to build the Uri from. $_SERVER will be added into the $server parameter.
fromGlobals( array $server null , array $query null , array $body null , array $cookies null , array $files null )
getBase( Psr\Http\Message\UriInterface $uri , array $server )
Calculate the base directory and webroot directory.
$uri
$server
marshalUriFromServer( array $server , array $headers )
Build a UriInterface object.
Add in some CakePHP specific logic/properties that help perserve backwards compatibility.
$server
$headers
updatePath( string $base , Psr\Http\Message\UriInterface $uri )
Updates the request URI to remove the base directory.
$base
$uri
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Http.ServerRequestFactory.html