On this page
Class PhpError
Object wrapper around PHP errors that are emitted by trigger_error()
Method Summary
__construct() public
Constructor
getCode() public
Get the PHP error constant.
getFile() public
Get the error file
getLabel() public
Get the error code label
getLine() public
Get the error line number.
getLogLevel() public
Get the mapped LOG_ constant.
getMessage() public
Get the error message.
getTrace() public
Get the stacktrace as an array.
getTraceAsString() public
Get the stacktrace as a string.
Method Detail
__construct() public
__construct(int $code, string $message, string|null $file = null, int|null $line = null, array $trace = [])
Constructor
Parameters
int
$code-
The PHP error code constant
string
$message-
The error message.
string|null
$file optional-
The filename of the error.
int|null
$line optional-
The line number for the error.
array
$trace optional-
The backtrace for the error.
getCode() public
getCode(): int
Get the PHP error constant.
Returns
int
getFile() public
getFile(): string|null
Get the error file
Returns
string|null
getLabel() public
getLabel(): string
Get the error code label
Returns
string
getLine() public
getLine(): int|null
Get the error line number.
Returns
int|null
getLogLevel() public
getLogLevel(): int
Get the mapped LOG_ constant.
Returns
int
getMessage() public
getMessage(): string
Get the error message.
Returns
string
getTrace() public
getTrace(): array
Get the stacktrace as an array.
Returns
array
getTraceAsString() public
getTraceAsString(): string
Get the stacktrace as a string.
Returns
string
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Error.PhpError.html