Response.php 999 Bytes
Newer Older
Qiang Xue committed
1 2 3
<?php
/**
 * @link http://www.yiiframework.com/
Qiang Xue committed
4
 * @copyright Copyright (c) 2008 Yii Software LLC
Qiang Xue committed
5 6 7 8 9 10
 * @license http://www.yiiframework.com/license/
 */

namespace yii\base;

/**
11 12
 * Response represents the response of an [[Application]] to a [[Request]].
 *
Qiang Xue committed
13 14 15
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
16
class Response extends Component
Qiang Xue committed
17
{
18 19 20 21 22
    /**
     * @var integer the exit status. Exit statuses should be in the range 0 to 254.
     * The status 0 means the program terminates successfully.
     */
    public $exitStatus = 0;
Qiang Xue committed
23

24 25 26 27 28 29
    /**
     * Sends the response to client.
     */
    public function send()
    {
    }
30

31 32 33 34 35 36 37 38 39 40 41 42
    /**
     * Removes all existing output buffers.
     */
    public function clearOutputBuffers()
    {
        // the following manual level counting is to deal with zlib.output_compression set to On
        for ($level = ob_get_level(); $level > 0; --$level) {
            if (!@ob_end_clean()) {
                ob_clean();
            }
        }
    }
Qiang Xue committed
43
}