Skip to content

ValidationArgument

ValidationArgument is a tuple of argument name and source that specifies the argument to validate.

class ValidationArgument

Since1.0.0
SourceValidator/ValidationArgument.php

public function __construct(string $name, string $source = null): mixed

Create a new ValidationArgument instance.

ParameterTypeDescription
$namestringthe name of the argument.
$sourcestringthe name of the source, if null, “parameters” is used.

Returns mixed

MethodDescription
getHash(): stringGet a unique hash value for this ValidationArgument.
getName(): stringRetrieve the name of the argument for this instance.
getSource(): stringRetrieve the name of the source for this instance.

public function getHash(): string

Get a unique hash value for this ValidationArgument.

Returns string — the hash value

public function getName(): string

Retrieve the name of the argument for this instance.

Returns string — the name of the argument

public function getSource(): string

Retrieve the name of the source for this instance.

Returns string — the name of the source.