Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\Property\Constraint\Constraints\UniqueValueConstraint Class Reference
Inheritance diagram for SMW\Property\Constraint\Constraints\UniqueValueConstraint:
Inheritance graph
[legend]
Collaboration diagram for SMW\Property\Constraint\Constraints\UniqueValueConstraint:
Collaboration graph
[legend]

Public Member Functions

 __construct (Store $store, PropertySpecificationLookup $propertySpecificationLookup)
 
 hasViolation ()
 
 isType ( $type)
 
 checkConstraint (array $constraint, $dataValue)
 

Additional Inherited Members

- Public Attributes inherited from SMW\Property\Constraint\Constraint
const TYPE_INSTANT = 'type/instant'
 
const TYPE_DEFERRED = 'type/deferred'
 

Detailed Description

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+

Since
3.1
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\Property\Constraint\Constraints\UniqueValueConstraint::__construct ( Store  $store,
PropertySpecificationLookup  $propertySpecificationLookup 
)
Since
2.4
Parameters
Store$store
PropertySpecificationLookup$propertySpecificationLookup

Member Function Documentation

◆ checkConstraint()

SMW\Property\Constraint\Constraints\UniqueValueConstraint::checkConstraint ( array  $constraint,
  $dataValue 
)
Since
3.1

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.

Since
3.1
Parameters
array$constraint
mixed$value

Implements SMW\Property\Constraint\Constraint.

◆ hasViolation()

SMW\Property\Constraint\Constraints\UniqueValueConstraint::hasViolation ( )
Since
3.1

Returns true when a violation during the check occurred.

Since
3.1
Returns
boolean

Implements SMW\Property\Constraint\Constraint.

◆ isType()

SMW\Property\Constraint\Constraints\UniqueValueConstraint::isType (   $type)
Since
3.1

Since
3.1
Parameters
string | integer$type
Returns
boolean

Implements SMW\Property\Constraint\Constraint.


The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy