Skip to content

final readonly class Error ​

Source Code

Represents a structural element documentation error.

NamespaceBeastBytes\CodPhp\Error
Inheritance

BeastBytes\CodPhp\Error\Error

Implements

JsonSerializable

Properties ​

$context ​

TypeRead/WriteDefault
arrayRead

Declared in BeastBytes\CodPhp\Error\Error


$element ​

TypeRead/WriteDefault
BeastBytes\CodPhp\Element\ElementRead

Declared in BeastBytes\CodPhp\Error\Error


$level ​

TypeRead/WriteDefault
BeastBytes\CodPhp\Error\ErrorLevelRead

Declared in BeastBytes\CodPhp\Error\Error


$message ​

TypeRead/WriteDefault
stringRead

Declared in BeastBytes\CodPhp\Error\Error


Methods ​

__construct() ​

Create a new Error.

public function __construct(string $message, BeastBytes\CodPhp\Element\Element $element, BeastBytes\CodPhp\Error\ErrorLevel $level, array $context)
$messagestringError message.
$elementBeastBytes\CodPhp\Element\ElementElement with the error.
$levelBeastBytes\CodPhp\Error\ErrorLevelError level.
$contextarrayContext of the error.

Declared in BeastBytes\CodPhp\Error\Error


jsonSerialize() ​

Used when generation JSON error report

public function jsonSerialize(): array
returnarray

Declared in BeastBytes\CodPhp\Error\Error


Generated by CodPhp