Slide 27
Slide 27 text
Confidential © 2018 for LANCERS, Inc. All Rights Reserved
27
cakephp/src/Http/ServerRequest.php
CakePHPでの実例(ServerRequest実装先)
/**
* A class that helps wrap Request information and
particulars about a single request.
* Provides methods commonly used to introspect on the
request headers and request body.
*/
class ServerRequest implements ServerRequestInterface
{
protected $params = [
'plugin' => null,
'controller' => null,
'action' => null,
'_ext' => null,
'pass' => [],
];
public function __construct(array $config = [])
{
$config += [
'params' => $this->params,
'query' => [],
'post' => [],
'files' => [],
'cookies' => [],
'environment' => [],
'url' => '',
'uri' => null,
'base' => '',
'webroot' => '',
'input' => null,
];
$this->_setConfig($config);
}