Comparator
in package
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- getOperator() : string
- Gets the comparison operator.
- getTarget() : string
- Gets the target value.
- setOperator() : mixed
- Sets the comparison operator.
- setTarget() : mixed
- test() : bool
- Tests against the target.
- doSetOperator() : void
Properties
$operator
private
mixed
$operator
= '=='
$target
private
mixed
$target
Methods
__construct()
public
__construct([string|null $target = null ][, string $operator = '==' ]) : mixed
Parameters
- $target : string|null = null
- $operator : string = '=='
getOperator()
Gets the comparison operator.
public
getOperator() : string
Return values
stringgetTarget()
Gets the target value.
public
getTarget() : string
Return values
stringsetOperator()
Sets the comparison operator.
public
setOperator(string $operator) : mixed
Parameters
- $operator : string
Tags
setTarget()
public
setTarget(string $target) : mixed
Parameters
- $target : string
Tags
test()
Tests against the target.
public
test(mixed $test) : bool
Parameters
- $test : mixed
-
A test value
Return values
booldoSetOperator()
private
doSetOperator(string $operator) : void
Parameters
- $operator : string