OXID eShop CE  4.9.11
 All Classes Files Functions Variables Pages
oxRequiredFieldsValidator Class Reference

Public Member Functions

 __construct ($oFieldValidator=null)
 getRequiredFields ()
 setRequiredFields ($aFields)
 getFieldValidator ()
 setFieldValidator ($oFieldValidator)
 getInvalidFields ()
 validateFields ($oObject)

Private Member Functions

 _setInvalidFields ($aFields)

Private Attributes

 $_aRequiredFields = array()
 $_aInvalidFields = array()
 $_oFieldValidator = array()

Detailed Description

Class for validating address

Definition at line 7 of file oxrequiredfieldsvalidator.php.

Constructor & Destructor Documentation

oxRequiredFieldsValidator::__construct (   $oFieldValidator = null)

Sets dependencies.

Parameters
oxRequiredFieldValidator$oFieldValidator

Definition at line 36 of file oxrequiredfieldsvalidator.php.

Member Function Documentation

oxRequiredFieldsValidator::_setInvalidFields (   $aFields)
private

Add fields to invalid fields array.

Parameters
array$aFieldsInvalid field name.

Definition at line 123 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::getFieldValidator ( )

Returns required fields for address.

Returns
oxRequiredFieldValidator

Definition at line 69 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::getInvalidFields ( )

Gets invalid fields.

Returns
array

Definition at line 89 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::getRequiredFields ( )

Returns required fields for address.

Returns
array

Definition at line 49 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::setFieldValidator (   $oFieldValidator)

Sets required fields array

Parameters
oxRequiredFieldValidator$oFieldValidator

Definition at line 79 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::setRequiredFields (   $aFields)

Sets required fields array

Parameters
array$aFieldsFields

Definition at line 59 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::validateFields (   $oObject)

Checks if all required fields are filled. Returns array of invalid fields or empty array if all fields are fine.

Parameters
oxBase$oObjectAddress fields with values.
Returns
bool If any invalid field exist.

Definition at line 102 of file oxrequiredfieldsvalidator.php.

Member Data Documentation

oxRequiredFieldsValidator::$_aInvalidFields = array()
private

Definition at line 22 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::$_aRequiredFields = array()
private

Definition at line 15 of file oxrequiredfieldsvalidator.php.

oxRequiredFieldsValidator::$_oFieldValidator = array()
private

Definition at line 29 of file oxrequiredfieldsvalidator.php.


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