Provides a top-level abstract implementation of IErrorBag.
- author Zaahid Bateson
Abstract
Methods |
public __construct(Psr\Log\LoggerInterface $logger) |
public addError(string $message, string $psrLogLevel, ?Throwable $exception = NULL) : static |
public getAllErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : array |
public getErrorLoggingContextName() : string Returns the class name. Override to identify objects in logs. |
public getErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : array |
public hasAnyErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : bool |
public hasErrors(bool $validate = false, string $minPsrLevel = 'error'Psr\Log\LogLevel::ERROR) : bool |
Properties |
protected Psr\Log\LoggerInterface $logger |
Methods |
protected abstract getErrorBagChildren() : array Return any children ErrorBag objects.
|
protected validate() : void Perform any extra validation and call 'addError'. getErrors and getAllErrors call validate() if their $validate parameter is true. validate() is only called once on an object with getErrors getAllErrors. |
Properties |
private array $errors = []
|
private bool $validated = false
|