Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Validator Class Reference
Inheritance diagram for Validator:
ValidatorInterface

Public Member Functions

 add (ValidatorInterface $validator)
 
 validate ($className)
 

Protected Attributes

 $_validators = []
 

Detailed Description

Definition at line 8 of file Validator.php.

Member Function Documentation

◆ add()

add ( ValidatorInterface  $validator)

Add validator

Parameters
ValidatorInterface$validator
Returns
void

Definition at line 21 of file Validator.php.

22  {
23  $this->_validators[] = $validator;
24  }

◆ validate()

validate (   $className)

Validate class

Parameters
string$className
Returns
bool
Exceptions

Implements ValidatorInterface.

Definition at line 33 of file Validator.php.

34  {
35  foreach ($this->_validators as $validator) {
36  $validator->validate($className);
37  }
38  }
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31

Field Documentation

◆ $_validators

$_validators = []
protected

Definition at line 13 of file Validator.php.


The documentation for this class was generated from the following file: