Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Console / Response.php
blobdf580c9800a2f3a20f0d3c0ed997b4e1d8a1a95a
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\Console;
12 use Zend\Stdlib\Message;
13 use Zend\Stdlib\ResponseInterface;
15 class Response extends Message implements ResponseInterface
18 /**
19 * @var bool
21 protected $contentSent = false;
23 /**
24 * Check if content was sent
26 * @return bool
27 * @deprecated
29 public function contentSent()
31 return $this->contentSent;
34 /**
35 * Set the error level that will be returned to shell.
37 * @param int $errorLevel
38 * @return Response
40 public function setErrorLevel($errorLevel)
42 $this->setMetadata('errorLevel', $errorLevel);
43 return $this;
46 /**
47 * Get response error level that will be returned to shell.
49 * @return int|0
51 public function getErrorLevel()
53 return $this->getMetadata('errorLevel', 0);
56 /**
57 * Send content
59 * @return Response
60 * @deprecated
62 public function sendContent()
64 if ($this->contentSent()) {
65 return $this;
67 echo $this->getContent();
68 $this->contentSent = true;
69 return $this;
72 /**
73 * @deprecated
75 public function send()
77 $this->sendContent();
78 $errorLevel = (int) $this->getMetadata('errorLevel',0);
79 exit($errorLevel);