Comparator
in package
Comparator.
Tags
Table of Contents
Properties
Methods
- getOperator() : string
- Gets the comparison operator.
- getTarget() : string
- Gets the target value.
- setOperator() : mixed
- Sets the comparison operator.
- setTarget() : mixed
- Sets the target value.
- test() : bool
- Tests against the target.
Properties
$operator
private
mixed
$operator
= '=='
$target
private
mixed
$target
Methods
getOperator()
Gets the comparison operator.
public
getOperator() : string
Return values
string —The operator
getTarget()
Gets the target value.
public
getTarget() : string
Return values
string —The target value
setOperator()
Sets the comparison operator.
public
setOperator(string $operator) : mixed
Parameters
- $operator : string
-
A valid operator
Tags
setTarget()
Sets the target value.
public
setTarget(string $target) : mixed
Parameters
- $target : string
-
The target value
test()
Tests against the target.
public
test(mixed $test) : bool
Parameters
- $test : mixed
-
A test value