EqualityConstraint
class EqualityConstraint implements ConstraintInterface
EqualityConstraint class.
The EqualityConstraint can be used to compare a resource's field or metadata against a specific value.
EqualityConstraints are one of the very basic constraints and are typically used ensure the type of a document or to match entries of a content type:
{
"equals": [{"doc": "sys.type"}, "Asset"]
}
Methods
__construct(string $doc = '', $value = null)
EqualityConstraint constructor.
getDoc()
No description
setDoc(string $doc)
No description
mixed|null
getValue()
No description
setValue(mixed $value)
No description
jsonSerialize()
{@inheritdoc}
Details
at line 46
__construct(string $doc = '', $value = null)
EqualityConstraint constructor.
at line 52
getDoc()
at line 60
EqualityConstraint
setDoc(string $doc)
at line 70
mixed|null
getValue()
at line 80
EqualityConstraint
setValue(mixed $value)
at line 90
jsonSerialize()
{@inheritdoc}