$_type
$_type : string
Security Exception type
Auth Security exception - used when SecurityComponent detects any issue with the current request
All HTTP status/error related exceptions should extend this class so catch blocks can be specifically typed.
You may also use this as a meaningful bridge to Cake\Core\Exception\Exception, e.g.: throw new \Cake\Network\Exception\HttpException('HTTP Version Not Supported', 505);
__construct(string|array $message = '', integer|null $code = null, \Exception|null $previous = null)
Constructor.
Allows you to create exceptions that are treated as framework errors and disabled when debug = 0.
string|array | $message | Either the string of the error message, or an array of attributes that are made available in the view, and sprintf()'d into Exception::$_messageTemplate |
integer|null | $code | The code of the error, is also the HTTP status code for the error. |
\Exception|null | $previous | the previous exception. |
responseHeader(string|array|null $header = null, string|null $value = null) : array
Get/set the response header to be used
See also Cake\Http\Response::withHeader()
string|array|null | $header | An array of header strings or a single header string
|
string|null | $value | The header value. |
Loading…