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.
intgetFile(): string|null
Get the error file
string|nullgetLabel(): string
Get the error code label
stringgetLine(): int|null
Get the error line number.
int|nullgetLogLevel(): int
Get the mapped LOG_ constant.
intgetMessage(): string
Get the error message.
stringgetTrace(): array
Get the stacktrace as an array.
arraygetTraceAsString(): 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