Comparison
: string
in package
Table of Contents
Cases
- Between = 'BETWEEN'
- Contains = 'CONTAINS'
- EndsWith = 'ENDS_WITH'
- Equals = '='
- GreaterThan = '>'
- GreaterThanOrEqual = '>='
- In = 'IN'
- LesserThan = '<'
- LesserThanOrEqual = '<='
- NotBetween = 'NBETWEEN'
- NotContain = 'NCONTAIN'
- NotEquals = '!='
- NotIn = 'NIN'
- NotRegexp = 'NREGEXP'
- Regexp = 'REGEXP'
- StartsWith = 'STARTS_WITH'
Methods
- accept() : void
- Assert if the reference value can be used with the Enum operator.
- compare() : bool
- Values comparison.
- fromOperator() : self
- tryFromOperator() : self|null
- isSingleValue() : bool
Cases
Equals
NotEquals
GreaterThan
GreaterThanOrEqual
LesserThan
LesserThanOrEqual
Between
NotBetween
Regexp
NotRegexp
In
NotIn
Contains
NotContain
StartsWith
EndsWith
Methods
accept()
Assert if the reference value can be used with the Enum operator.
public
accept(mixed $reference) : void
Parameters
- $reference : mixed
Tags
compare()
Values comparison.
public
compare(mixed $subject, mixed $reference) : bool
The method return true if the values satisfy the comparison operator, otherwise false is returned.
Parameters
- $subject : mixed
- $reference : mixed
Tags
Return values
boolfromOperator()
public
static fromOperator(string $operator) : self
Parameters
- $operator : string
Tags
Return values
selftryFromOperator()
public
static tryFromOperator(string $operator) : self|null
Parameters
- $operator : string
Return values
self|nullisSingleValue()
private
static isSingleValue(mixed $value) : bool
Parameters
- $value : mixed