Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (Store $store, PropertySpecificationLookup $propertySpecificationLookup) | |
hasViolation () | |
getType () | |
checkConstraint (array $constraint, $dataValue) | |
Public Attributes | |
const | CONSTRAINT_KEY = 'unique_value_constraint' |
Public Attributes inherited from SMW\Constraint\Constraint | |
const | CLASS_CONSTRAINT_SCHEMA = 'CLASS_CONSTRAINT_SCHEMA' |
const | PROPERTY_CONSTRAINT_SCHEMA = 'PROPERTY_CONSTRAINT_SCHEMA' |
const | TYPE_INSTANT = 'type/instant' |
const | TYPE_DEFERRED = 'type/deferred' |
The unique_value_constraint
implicitly requires a GLOBAL_SCOPE
(instead of only an ENTITY_SCOPE
which would just require a single_value_constraint
).
GNU GPL v2+
SMW\Constraint\Constraints\UniqueValueConstraint::__construct | ( | Store | $store, |
PropertySpecificationLookup | $propertySpecificationLookup | ||
) |
Store | $store | |
PropertySpecificationLookup | $propertySpecificationLookup |
SMW\Constraint\Constraints\UniqueValueConstraint::checkConstraint | ( | array | $constraint, |
$dataValue | |||
) |
Checks a constraint against a single value. Any error that occurred during the processing should be attached to an individual value using the ConstraintError
class.
array | $constraint | |
mixed | $value |
Implements SMW\Constraint\Constraint.
SMW\Constraint\Constraints\UniqueValueConstraint::getType | ( | ) |
SMW\Constraint\Constraints\UniqueValueConstraint::hasViolation | ( | ) |
Returns true when a violation during the check occurred.
Implements SMW\Constraint\Constraint.
const SMW\Constraint\Constraints\UniqueValueConstraint::CONSTRAINT_KEY = 'unique_value_constraint' |
Defines the expected key in the JSON