Class yii\web\HeadersAlreadySentException
| Inheritance | yii\web\HeadersAlreadySentException » yii\base\Exception » Exception |
|---|---|
| Available since version | 2.0.14 |
| Source Code | https://github.com/yiisoft/yii2/blob/master/framework/web/HeadersAlreadySentException.php |
HeadersAlreadySentException represents an exception caused by any headers that were already sent before web response was sent.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | yii\web\HeadersAlreadySentException | |
| getName() | yii\base\Exception |
Method Details
| public void __construct ( $file, $line ) | ||
| $file | ||
| $line | ||
public function __construct($file, $line)
{
$message = YII_DEBUG ? "Headers already sent in {$file} on line {$line}." : 'Headers already sent.';
parent::__construct($message);
}
Defined in: yii\base\Exception::getName()
| public string getName ( ) | ||
| return | string |
The user-friendly name of this exception |
|---|---|---|
public function getName()
{
return 'Exception';
}