\ValidFormBuilderComparison

Comparison class

A comparison object is part of a condition and represents a single value comparison.

Summary

Methods
Properties
Constants
__get()
__set()
__call()
__construct()
check()
jsonSerialize()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__get()

__get(string  $property) 

Magic getter method

Parameters

string $property

Throws

\BadMethodCallException

__set()

__set(string  $property, mixed  $value) 

Magic setter method

Parameters

string $property
mixed $value

Throws

\BadMethodCallException

__call()

__call(string  $method, mixed  $values) 

Magic caller method

Parameters

string $method
mixed $values

Throws

\BadMethodCallException

__construct()

__construct(\ValidFormBuilder\Element  $objSubject, integer  $varComparison, string  $varValue = null) 

Create new Comparison

Parameters

\ValidFormBuilder\Element $objSubject

The subject to check the value upon

integer $varComparison

The Comparison type constant

string $varValue

The value to check against

Throws

\InvalidArgumentException
\Exception

check()

check(  $intDynamicPosition) : boolean

Check this comparison

Parameters

$intDynamicPosition

Returns

boolean —

True if Comparison meets requirements, false if not.

jsonSerialize()

jsonSerialize(string  $intDynamicPosition = null) : array

Convert the Comparion's contents to a json string in order to validate this comparison client-side

Parameters

string $intDynamicPosition

Returns

array —

The generated JSON