for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is a part of a nekland library
*
* (c) Nekland <[email protected]>
* For the full license, take a look to the LICENSE file
* on the root directory of this project
*/
namespace Nekland\Woketo\Http;
abstract class AbstractHttpMessage
{
* @var HttpHeadersBag
private $headers;
* @var string for example "HTTP/1.1"
private $httpVersion;
* @param string $httpVersion
* @return Request
protected function setHttpVersion($httpVersion)
$this->httpVersion = $httpVersion;
return $this;
}
* @param string $name
* @param string $value
public function addHeader(string $name, string $value)
if (null === $this->headers) {
$this->headers = new HttpHeadersBag();
$this->headers->add($name, $value);
* @param string $header
* @return string
public function getHeader($header)
return $this->headers[$header];
public function getHttpVersion()
return $this->httpVersion;
* @return array|HttpHeadersBag
public function getHeaders()
return $this->headers;