ValidationPath
class ValidationPath implements Stringable
Methods
Create a validation path.
Create a validation path from dot notation.
Append a property or collection segment.
Append one raw collection key.
Append a collection wildcard.
Determine if this is the root path.
Get the path segments.
Get structural segments with wildcards represented by null.
Get the path in dot notation.
Get the string form of the path.
Determine if this path contains a wildcard.
Get the concrete paths matching this wildcard path.
Recursively expand wildcard segments against a payload.
Parse Validator dot notation into structural segments.
Details
at line 16
__construct(array $path = [])
Create a validation path.
at line 24
static ValidationPath
create(string|null $path = null)
Create a validation path from dot notation.
at line 36
ValidationPath
property(string|int $property)
Append a property or collection segment.
at line 51
ValidationPath
item(string|int $key)
Append one raw collection key.
at line 63
ValidationPath
wildcard()
Append a collection wildcard.
at line 75
bool
isRoot()
Determine if this is the root path.
at line 83
bool
equals(string|ValidationPath $other)
Determine if this path equals another path.
at line 97
array
segments()
Get the path segments.
at line 110
array
rawSegments()
Get structural segments with wildcards represented by null.
at line 118
string
get()
Get the path in dot notation.
at line 133
string
__toString()
Get the string form of the path.
at line 141
bool
containsWildcards()
Determine if this path contains a wildcard.
at line 151
array
matchingWildcardPayloadValidationPaths(array $fullPayload)
Get the concrete paths matching this wildcard path.
at line 163
protected array
expandWildcardPath(array $remainingSegments, mixed $payload, array $resolvedSegments = [])
Recursively expand wildcard segments against a payload.
at line 206
static protected array
parseDotPath(string $path)
Parse Validator dot notation into structural segments.