Comparison
extends ClassDynamic
in package
Comparison class
A comparison object is part of a condition and represents a single value comparison.
Tags
Table of Contents
Methods
- __call() : mixed
- Magic caller method
- __construct() : mixed
- Create new Comparison
- __get() : mixed
- Magic getter method
- __set() : mixed
- Magic setter method
- check() : bool
- Check this comparison
- jsonSerialize() : array<string|int, mixed>
- Convert the Comparion's contents to a json string in order to validate this comparison client-side
Methods
__call()
Magic caller method
public
__call(string $method, mixed $values) : mixed
Parameters
- $method : string
- $values : mixed
Tags
__construct()
Create new Comparison
public
__construct(Element $objSubject, int $varComparison[, string $varValue = null ]) : mixed
Parameters
- $objSubject : Element
-
The subject to check the value upon
- $varComparison : int
-
The Comparison type constant
- $varValue : string = null
-
The value to check against
Tags
__get()
Magic getter method
public
__get(string $property) : mixed
Parameters
- $property : string
Tags
__set()
Magic setter method
public
__set(string $property, mixed $value) : mixed
Parameters
- $property : string
- $value : mixed
Tags
check()
Check this comparison
public
check([mixed $intDynamicPosition = 0 ]) : bool
Parameters
- $intDynamicPosition : mixed = 0
Return values
bool —True if Comparison meets requirements, false if not.
jsonSerialize()
Convert the Comparion's contents to a json string in order to validate this comparison client-side
public
jsonSerialize([string $intDynamicPosition = null ]) : array<string|int, mixed>
Parameters
- $intDynamicPosition : string = null
Return values
array<string|int, mixed> —The generated JSON