35 lines
813 B
PHP
35 lines
813 B
PHP
|
<?php
|
||
|
|
||
|
/*
|
||
|
* This file is part of the Symfony package.
|
||
|
*
|
||
|
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
|
||
|
*
|
||
|
* For the full copyright and license information, please view the LICENSE
|
||
|
* file that was distributed with this source code.
|
||
|
*/
|
||
|
|
||
|
namespace Symfony\Component\HttpFoundation;
|
||
|
|
||
|
/**
|
||
|
* HeaderBag is a container for HTTP headers.
|
||
|
*
|
||
|
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
||
|
* @author Bulat Shakirzyanov <mallluhuct@gmail.com>
|
||
|
*/
|
||
|
class ServerBag extends ParameterBag
|
||
|
{
|
||
|
public function getHeaders()
|
||
|
{
|
||
|
$headers = array();
|
||
|
|
||
|
foreach ($this->parameters as $key => $value) {
|
||
|
if ('http_' === strtolower(substr($key, 0, 5))) {
|
||
|
$headers[substr($key, 5)] = $value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return $headers;
|
||
|
}
|
||
|
}
|