Used for the comparison of values.
@author Daniel Holmes <daniel@danielholmes.org>
Expanded class hierarchy of AbstractComparison
abstract class AbstractComparison extends Constraint {
public $message;
public $value;
/**
* {@inheritDoc}
*/
public function __construct($options = null) {
if (!isset($options['value'])) {
throw new ConstraintDefinitionException(sprintf('The %s constraint requires the "value" option to be set.', get_class($this)));
}
parent::__construct($options);
}
/**
* {@inheritDoc}
*/
public function getDefaultOption() {
return 'value';
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractComparison:: |
public | property | 8 | |
AbstractComparison:: |
public | property | ||
AbstractComparison:: |
public | function |
Returns the name of the default option Overrides Constraint:: |
|
AbstractComparison:: |
public | function |
Initializes the constraint with options. Overrides Constraint:: |
|
Constraint:: |
public | property | ||
Constraint:: |
public | function | Adds the given group if this constraint is in the Default group | |
Constraint:: |
constant | Marks a constraint that can be put onto classes | ||
Constraint:: |
constant | The name of the group given to all constraints with no explicit group | ||
Constraint:: |
public | function | Returns the name of the required options | 10 |
Constraint:: |
public | function | Returns whether the constraint can be put onto classes, properties or both | 7 |
Constraint:: |
constant | Marks a constraint that can be put onto properties | ||
Constraint:: |
public | function | Returns the name of the class that validates this constraint | 2 |
Constraint:: |
public | function | Unsupported operation. |