Object wrapper around PHP errors that are emitted by trigger_error()
Constructor
Get the PHP error constant.
Get the error file
Get the error code label
Get the error line number.
Get the mapped LOG_ constant.
Get the error message.
Get the stacktrace as an array.
Get the stacktrace as a string.
__construct(int $code, string $message, string|null $file = null, int|null $line = null, array $trace = [])
Constructor
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(): int
Get the PHP error constant.
int
getFile(): string|null
Get the error file
string|null
getLabel(): string
Get the error code label
string
getLine(): int|null
Get the error line number.
int|null
getLogLevel(): int
Get the mapped LOG_ constant.
int
getMessage(): string
Get the error message.
string
getTrace(): array
Get the stacktrace as an array.
array
getTraceAsString(): string
Get the stacktrace as a string.
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