Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'sendresponse' of git://github.com/prolic/zf2 into featu…
Browse files Browse the repository at this point in the history
…re/send-response-listener

Conflicts:
	library/Zend/Mvc/View/Http/ViewManager.php
  • Loading branch information
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@
*/
class Response extends Message implements ResponseInterface
{

/**
* @var bool
*/
protected $contentSent = false;

/**
* Check if content was sent
*
* @return bool
* @deprecated
*/
public function contentSent()
{
return $this->contentSent;
Expand Down Expand Up @@ -48,6 +58,12 @@ public function getErrorLevel()
return $this->getMetadata('errorLevel', 0);
}

/**
* Send content
*
* @return Response
* @deprecated
*/
public function sendContent()
{
if ($this->contentSent()) {
Expand All @@ -58,10 +74,14 @@ public function sendContent()
return $this;
}

/**
* @deprecated
*/
public function send()
{
$this->sendContent();
$errorLevel = (int) $this->getMetadata('errorLevel',0);
exit($errorLevel);
}

}

0 comments on commit e163876

Please sign in to comment.