AbstractException
extends Exception
in package
implements
RuleExceptionInterface
AbstractYes
Table of Contents
Interfaces
Constants
- PLACEHOLDER_PATTERN = '/\{\{(\w+)\}\}/'
Properties
- $message_format : string
- $rule : RuleInterface
Methods
- __construct() : mixed
- addValidationalError() : array<string|int, mixed>
- convertValidationError() : ValidationalErrorInterface
- formatMessage() : string
- replacePlaceholder() : string
Constants
PLACEHOLDER_PATTERN
private
mixed
PLACEHOLDER_PATTERN
= '/\{\{(\w+)\}\}/'
Properties
$message_format read-only
private
string
$message_format
$rule read-only
private
RuleInterface
$rule
Methods
__construct()
public
__construct(string $message_format, RuleInterface $rule) : mixed
Parameters
- $message_format : string
- $rule : RuleInterface
addValidationalError()
public
addValidationalError(array<string|int, mixed> $exceptions, string $input_key) : array<string|int, mixed>
Parameters
- $exceptions : array<string|int, mixed>
- $input_key : string
Return values
array<string|int, mixed>convertValidationError()
public
convertValidationError(string $input_key[, string|null $label = null ][, string|null $description = null ]) : ValidationalErrorInterface
Parameters
- $input_key : string
- $label : string|null = null
- $description : string|null = null
Return values
ValidationalErrorInterfaceformatMessage()
protected
formatMessage(string $error, array<string|int, mixed> $placeholders) : string
Parameters
- $error : string
- $placeholders : array<string|int, mixed>
Return values
stringreplacePlaceholder()
private
replacePlaceholder(array<string|int, mixed> $matches, array<string|int, mixed> $placeholders) : string
Parameters
- $matches : array<string|int, mixed>
- $placeholders : array<string|int, mixed>