src/Web/WebClient.php
protected function detectHeaders()
	{
		if (\function_exists('getallheaders'))
		{
			// If php is working under Apache, there is a special function
			$this->headers = getallheaders();
		}
		else
		{
			// Else we fill headers from $_SERVER variable
			$this->headers = array();

			foreach ($_SERVER as $name => $value)
			{
				if (substr($name, 0, 5) == 'HTTP_')
				{
					$this->headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
				}
			}
		}

		// Mark this detection routine as run.
		$this->detection['headers'] = true;
	}
protected function detectHeaders()
	{
		if (\function_exists('getallheaders'))
		{
			// If php is working under Apache, there is a special function
			$this->headers = getallheaders();
		}
		else
		{
			// Else we fill headers from $_SERVER variable
			$this->headers = array();

			foreach ($_SERVER as $name => $value)
			{
				if (substr($name, 0, 5) == 'HTTP_')
				{
					$this->headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
				}
			}
		}

		// Mark this detection routine as run.
		$this->detection['headers'] = true;
	}
protected function detectHeaders ( ) { if ( \ function_exists ( 'getallheaders' ) ) { // If php is working under Apache, there is a special function $ this -> headers = getallheaders ( ) ; } else { // Else we fill headers from $_SERVER variable $ this -> headers = array ( ) ; foreach ( $ _SERVER as $ name => $ value ) { if ( substr ( $ name , 0 , 5 ) == 'HTTP_' ) { $ this -> headers [ str_replace ( ' ' , '-' , ucwords ( strtolower ( str_replace ( '_' , ' ' , substr ( $ name , 5 ) ) ) ) ) ] = $ value ; } } } // Mark this detection routine as run. $ this -> detection [ 'headers' ] = true ; }
Fills internal array of headers

@return  void

@since   1.3.0
Fills internal array of headers