function __construct(array $server = NULL, array $query = NULL, array $xargs = NULL, array $files = NULL, array $cookie = NULL) { $this->server = $server ?: $_SERVER; $this->cookie = $cookie ?: $_COOKIE; parent::__construct($server, $query, $xargs, $files); foreach ($this->headers as $name => $header) { $this->headerNames[$name] = str_replace(' ', '-', ucwords(str_replace('-', ' ', strtolower($name)))); } }