EqualityConstraint
class EqualityConstraint implements ConstraintInterface
EqualityConstraint class.
The EqualityConstraint can be used to compare a resource's field or meta dataagainst 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 = '', mixed|null $value = null)
InConstraint constructor.
string
getDoc()
No description
setDoc(string $doc)
No description
mixed|null
getValue()
No description
setValue(mixed $value)
No description
array
jsonSerialize()
Returns an array to be used by "json_encode" to serialize objects of this class.
Details
at line 45
__construct(string $doc = '', mixed|null $value = null)
InConstraint constructor.
at line 54
string
getDoc()
at line 64
EqualityConstraint
setDoc(string $doc)
at line 74
mixed|null
getValue()
at line 84
EqualityConstraint
setValue(mixed $value)
at line 96
array
jsonSerialize()
Returns an array to be used by "json_encode" to serialize objects of this class.