This commit is contained in:
Dennis Eichhorn 2017-09-05 11:27:13 +02:00 committed by GitHub
parent 4aa204858b
commit ebab71704a

View File

@ -34,6 +34,33 @@ abstract class HeaderAbstract
*/ */
protected static $isLocked = false; protected static $isLocked = false;
/**
* Response status.
*
* @var int
* @since 1.0.0
*/
protected $status = 0;
/**
* {@inheritdoc}
* todo: shouldn't this only be available in the header?!
*/
public function setStatusCode(int $status) /* : void */
{
$this->status = $status;
$this->header->generate($status);
}
/**
* {@inheritdoc}
* todo: shouldn't this only be available in the header?!
*/
public function getStatusCode() : int
{
return $this->status;
}
/** /**
* Set header. * Set header.
* *