Semantic MediaWiki and related extensions
|
Public Member Functions | |
hasViolation () | |
isType ( $type) | |
checkConstraint (array $constraint, $value) | |
Public Attributes | |
const | TYPE_INSTANT = 'type/instant' |
const | TYPE_DEFERRED = 'type/deferred' |
GNU GPL v2+
SMW\Property\Constraint\Constraint::checkConstraint | ( | array | $constraint, |
$value | |||
) |
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 |
Implemented in SMW\Property\Constraint\Constraints\UniqueValueConstraint, SMW\Property\Constraint\Constraints\CommonConstraint, and SMW\Property\Constraint\Constraints\NullConstraint.
SMW\Property\Constraint\Constraint::hasViolation | ( | ) |
Returns true when a violation during the check occurred.
Implemented in SMW\Property\Constraint\Constraints\UniqueValueConstraint, SMW\Property\Constraint\Constraints\CommonConstraint, and SMW\Property\Constraint\Constraints\NullConstraint.
SMW\Property\Constraint\Constraint::isType | ( | $type | ) |
string | integer | $type |
Implemented in SMW\Property\Constraint\Constraints\UniqueValueConstraint, SMW\Property\Constraint\Constraints\CommonConstraint, SMW\Property\Constraint\Constraints\DeferrableConstraint, and SMW\Property\Constraint\Constraints\NullConstraint.
const SMW\Property\Constraint\Constraint::TYPE_DEFERRED = 'type/deferred' |
The constraint check happens after a GET request using the job queue.
const SMW\Property\Constraint\Constraint::TYPE_INSTANT = 'type/instant' |
The constraint check happens instantaneous on a GET request (aka. online) and should be used for "light" checks that doesn't involve the QueryEngine
or a rule resolver given the potential computational requirements that are required to run checks on each individual value.