Valdi\Validator\AbstractComparator¶
-
class
AbstractComparator
¶ Validator for comparing values.
-
property
amountOfParameters
¶ protected
Holds the amount of parameters.
-
property
type
¶ protected
Holds the type of the validator.
-
isValidComparison
($value, $parameters)¶ Performs the comparison.
Parameters: - $value (mixed) – the first value to compare
- $parameters (mixed) – the values to compare
Returns: boolean true if value compares to the parameters
-
isAllNumeric
()¶ Checks whether all given parameters are numeric.
Returns: boolean true if all values are numeric
-
isValid
($value, $parameters)¶ -
Parameters: - $value –
- $parameters –
-
getInvalidDetails
()¶
-
validateParameterCount
($name, $parameterAmount, $parameters)¶ Throws an exception if the parameters don’t fulfill the expected parameter count.
Parameters: - $name (string) – the name of the validator
- $parameterAmount (integer) – the amount of expected parameters
- $parameters (string[]) – the parameters
-
property