web\HttpException __construct()

__construct() public method Constructor. public void __construct ( $status, $message = null, $code = 0, Exception $previous = null )$status integer HTTP status code, such as 404, 500, etc. $message string Error message $code integer Error code $previous Exception The previous exception used for the exception chaining.

web\HttpException getName()

getName() public method public string getName ( )return string The user-friendly name of this exception

web\HttpException $statusCode

$statusCode public property HTTP status code, such as 403, 404, 500, etc. public integer $statusCode = null

web\HtmlResponseFormatter format()

format() public method Formats the specified response. public void format ( $response )$response yii\web\Response The response to be formatted.

web\HtmlResponseFormatter $contentType

$contentType public property The Content-Type header for the response public string $contentType = 'text/html'

web\HeaderCollection toArray()

toArray() public method Returns the collection as a PHP array. public array toArray ( )return array The array representation of the collection. The array keys are header names, and the array values are the corresponding header values.

web\HeaderCollection setDefault()

setDefault() public method Sets a new header only if it does not exist yet. If there is already a header with the same name, the new one will be ignored. public $this setDefault ( $name, $value )$name string The name of the header $value string The value of the header return $this The collection object itself

web\HeaderCollection set()

set() public method Adds a new header. If there is already a header with the same name, it will be replaced. public $this set ( $name, $value = '' )$name string The name of the header $value string The value of the header return $this The collection object itself

web\HeaderCollection removeAll()

removeAll() public method Removes all headers. public void removeAll ( )

web\HeaderCollection remove()

remove() public method Removes a header. public array remove ( $name )$name string The name of the header to be removed. return array The value of the removed header. Null is returned if the header does not exist.