\app\framework\Component\ValidationValidation

Validation component main class

Summary

Methods
Properties
Constants
getInstance()
deleteInstance()
init()
validate()
addValidator()
No public properties found
No constants found
No protected methods found
$wfInstance
N/A
__construct()
__wakeup()
__clone()
getValidators()
$validators
N/A

Properties

$wfInstance

$wfInstance : 

Type

$validators

$validators : 

Type

Methods

getInstance()

getInstance() : $this

Return the current instance.

If instance doesn't exist, a new instance will be created.

Returns

$this

deleteInstance()

deleteInstance() 

Deletes the current singleton instance.

init()

init() 

validate()

validate(mixed  $data, string|array  $validators, boolean|true  $throw = true) : boolean

Parameters

mixed $data
string|array $validators
boolean|true $throw

Returns

boolean

__construct()

__construct() 

The constructor is set to private to prevent creating new instances.

If you want to fire a function after the singleton instance is created, just implement 'init' method into your class.

__wakeup()

__wakeup() 

Declare it as private.

__clone()

__clone() 

Declare it as private.

getValidators()

getValidators(  $validators) 

Parameters

$validators