ValidationData
class ValidationData
Properties
| static protected string|null | $placeholderHash | The current placeholder hash. |
Methods
Encode escaped dots and asterisks in an attribute.
Decode escaped dots and asterisks in an attribute.
Encode literal dots and asterisks in a data key.
Encode literal dots and asterisks in data keys.
Decode literal dots and asterisks in data keys.
Replace placeholders in the given string.
Expand a wildcard attribute into its matching concrete keys.
Initialize and gather data for the given attribute.
Gather a copy of the attribute data filled with any missing attributes.
Get all of the exact attribute values for a given wildcard attribute.
Extract data based on the given dot-notated path.
Get the explicit part of the attribute name.
Get the placeholder hash.
Flush all static state.
Details
at line 20
static string
encodeAttribute(string $attribute)
Encode escaped dots and asterisks in an attribute.
at line 34
static string
decodeAttribute(string $attribute)
Decode escaped dots and asterisks in an attribute.
at line 48
static string
encodeKey(int|string $key)
Encode literal dots and asterisks in a data key.
at line 62
static array
encodeKeys(array $data)
Encode literal dots and asterisks in data keys.
at line 88
static array
decodeKeys(array $data)
Decode literal dots and asterisks in data keys.
at line 104
static string
replacePlaceholderInString(string $value)
Replace placeholders in the given string.
at line 121
static array
expandWildcardKeys(string $attribute, array $data)
Expand a wildcard attribute into its matching concrete keys.
at line 134
static array
initializeAndGatherData(string $attribute, array $masterData)
Initialize and gather data for the given attribute.
at line 148
static protected array
initializeAttributeOnData(string $attribute, array $masterData)
Gather a copy of the attribute data filled with any missing attributes.
at line 164
static protected array
extractValuesForWildcards(array $masterData, array $data, string $attribute)
Get all of the exact attribute values for a given wildcard attribute.
at line 192
static array
extractDataFromPath(string|null $attribute, array $masterData)
Extract data based on the given dot-notated path.
Used to extract a sub-section of the data for faster iteration.
at line 212
static string|null
getLeadingExplicitAttributePath(string $attribute)
Get the explicit part of the attribute name.
E.g. 'foo.bar.*.baz' -> 'foo.bar'
Allows us to not spin through all of the flattened data for some operations.
at line 220
static protected string
placeholderHash()
Get the placeholder hash.
at line 283
static void
flushState()
Flush all static state.