final readonly class Error
Represents a structural element documentation error.
| Namespace | BeastBytes\CodPhp\Error |
|---|---|
| Inheritance | BeastBytes\CodPhp\Error\Error |
| Implements | JsonSerializable |
Properties
$context
| Type | Read/Write | Default |
|---|---|---|
| array | Read |
Declared in BeastBytes\CodPhp\Error\Error
$element
| Type | Read/Write | Default |
|---|---|---|
| BeastBytes\CodPhp\Element\Element | Read |
Declared in BeastBytes\CodPhp\Error\Error
$level
| Type | Read/Write | Default |
|---|---|---|
| BeastBytes\CodPhp\Error\ErrorLevel | Read |
Declared in BeastBytes\CodPhp\Error\Error
$message
| Type | Read/Write | Default |
|---|---|---|
| string | Read |
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) | ||
| $message | string | Error message. |
| $element | BeastBytes\CodPhp\Element\Element | Element with the error. |
| $level | BeastBytes\CodPhp\Error\ErrorLevel | Error level. |
| $context | array | Context of the error. |
Declared in BeastBytes\CodPhp\Error\Error
jsonSerialize()
Used when generation JSON error report
| public function jsonSerialize(): array | ||
| return | array | |
Declared in BeastBytes\CodPhp\Error\Error
Generated by CodPhp