Public Member Functions |
| __construct () |
| validateBasketAmount ($dAmount) |
| checkLogin ($oUser, $sLogin, $aInvAddress) |
| checkEmail ($oUser, $sEmail) |
| checkPassword ($oUser, $sNewPass, $sConfPass, $blCheckLength=false) |
| checkRequiredFields ($oUser, $aInvAddress, $aDelAddress) |
| checkRequiredArrayFields ($oUser, $sFieldName, $aFieldValues) |
| checkCountries ($oUser, $aInvAddress, $aDelAddress) |
| checkVatId ($oUser, $aInvAddress) |
| getFieldValidationErrors () |
| getFirstValidationError () |
| validatePaymentInputData ($sPaymentId, &$aDynValue) |
| __call ($sMethod, $aArgs) |
| getConfig () |
| setConfig ($oConfig) |
| getSession () |
| setSession ($oSession) |
| getUser () |
| setUser ($oUser) |
| isAdmin () |
| setAdminMode ($blAdmin) |
Static Private Attributes |
static | $_instance = null |
Detailed Description
Class for validating input
Definition at line 7 of file oxinputvalidator.php.
Constructor & Destructor Documentation
oxInputValidator::__construct |
( |
| ) |
|
Class constructor. The constructor is defined in order to be possible to call parent::__construct() in modules.
Reimplemented from oxSuperCfg.
Definition at line 77 of file oxinputvalidator.php.
Member Function Documentation
oxInputValidator::_addValidationError |
( |
|
$sFieldName, |
|
|
|
$oErr |
|
) |
| |
|
protected |
Used to collect user validation errors. This method is called from all of the input checking functionality to report found error.
- Parameters
-
string | $sFieldName | field name |
exception | $oErr | exception |
- Returns
- exception
Definition at line 463 of file oxinputvalidator.php.
oxInputValidator::_cleanDebitInformation |
( |
|
$aDebitInformation | ) |
|
|
protected |
oxInputValidator::_fixAccountNumber |
( |
|
$aDebitInfo | ) |
|
|
protected |
If account number is shorter than 10, add zeros in front of number.
- Parameters
-
- Returns
- array
Definition at line 525 of file oxinputvalidator.php.
oxInputValidator::_getVatIdValidator |
( |
| ) |
|
|
protected |
oxInputValidator::_isAllBankInformationSet |
( |
|
$aRequiredFields, |
|
|
|
$aBankInformation |
|
) |
| |
|
protected |
- Parameters
-
array | $aRequiredFields | fields must be set. |
array | $aBankInformation | actual information. |
- Returns
- bool
Definition at line 545 of file oxinputvalidator.php.
oxInputValidator::_isVATIdentificationNumberInvalid |
( |
|
$aInvAddress, |
|
|
|
$oCountry |
|
) |
| |
|
private |
Compares country VAT identification number with it's prefix.
- Parameters
-
- Returns
- bool
Definition at line 579 of file oxinputvalidator.php.
oxInputValidator::_validateDebitNote |
( |
|
$aDebitInformation | ) |
|
|
protected |
oxInputValidator::_validateOldDebitInfo |
( |
|
$aDebitInfo | ) |
|
|
protected |
oxInputValidator::checkCountries |
( |
|
$oUser, |
|
|
|
$aInvAddress, |
|
|
|
$aDelAddress |
|
) |
| |
Checks if user defined countries (billing and delivery) are active
- Parameters
-
oxUser | $oUser | active user |
array | $aInvAddress | billing address info |
array | $aDelAddress | delivery address info |
- Returns
- null
Definition at line 331 of file oxinputvalidator.php.
oxInputValidator::checkEmail |
( |
|
$oUser, |
|
|
|
$sEmail |
|
) |
| |
Checks if email (used as login) is not empty and is valid.
- Parameters
-
oxUser | $oUser | active user |
string | $sEmail | user email/login |
- Returns
- null
Definition at line 185 of file oxinputvalidator.php.
oxInputValidator::checkLogin |
( |
|
$oUser, |
|
|
|
$sLogin, |
|
|
|
$aInvAddress |
|
) |
| |
Checks if user name does not break logic:
- if user wants to UPDATE his login name, performing check if user entered correct password
- additionally checking for user name duplicates. This is usually needed when creating new users. On any error exception is thrown.
- Parameters
-
oxUser | $oUser | active user |
string | $sLogin | user preferred login name |
array | $aInvAddress | user information |
- Returns
- string login name
Definition at line 139 of file oxinputvalidator.php.
oxInputValidator::checkPassword |
( |
|
$oUser, |
|
|
|
$sNewPass, |
|
|
|
$sConfPass, |
|
|
|
$blCheckLength = false |
|
) |
| |
Checking if user password is fine. In case of error exception is thrown
- Parameters
-
oxUser | $oUser | active user |
string | $sNewPass | new user password |
string | $sConfPass | retyped user password |
bool | $blCheckLength | option to check password length |
- Returns
- null
Definition at line 215 of file oxinputvalidator.php.
oxInputValidator::checkRequiredArrayFields |
( |
|
$oUser, |
|
|
|
$sFieldName, |
|
|
|
$aFieldValues |
|
) |
| |
Checks if all values are filled up
- Parameters
-
oxUser | $oUser | active user |
string | $sFieldName | checking field name |
array | $aFieldValues | field values |
- Returns
- null
Definition at line 310 of file oxinputvalidator.php.
oxInputValidator::checkRequiredFields |
( |
|
$oUser, |
|
|
|
$aInvAddress, |
|
|
|
$aDelAddress |
|
) |
| |
Checking if all required fields were filled. In case of error exception is thrown
- Parameters
-
oxUser | $oUser | active user |
array | $aInvAddress | billing address |
array | $aDelAddress | delivery address |
- Returns
- null
Definition at line 252 of file oxinputvalidator.php.
oxInputValidator::checkVatId |
( |
|
$oUser, |
|
|
|
$aInvAddress |
|
) |
| |
Checks if user passed VAT id is valid. Exception is thrown if id is not valid
- Parameters
-
oxUser | $oUser | active user |
array | $aInvAddress | user input array |
- Returns
- null
Definition at line 365 of file oxinputvalidator.php.
oxInputValidator::getFieldValidationErrors |
( |
| ) |
|
Returns error array if input validation for current field and rule reported an error
- Returns
- array
Definition at line 392 of file oxinputvalidator.php.
oxInputValidator::getFirstValidationError |
( |
| ) |
|
static oxInputValidator::getInstance |
( |
| ) |
|
|
static |
oxInputValidator::validateBasketAmount |
( |
|
$dAmount | ) |
|
Validates basket amount
- Parameters
-
float | $dAmount | amount of article |
- Exceptions
-
- Returns
- float
Definition at line 102 of file oxinputvalidator.php.
oxInputValidator::validatePaymentInputData |
( |
|
$sPaymentId, |
|
|
& |
$aDynValue |
|
) |
| |
Validates payment input data for credit card and debit note
- Parameters
-
string | $sPaymentId | the payment id of current payment |
array | &$aDynValue | values of payment |
- Returns
- bool
Definition at line 420 of file oxinputvalidator.php.
Member Data Documentation
oxInputValidator::$_aInputValidationErrors = array() |
|
protected |
oxInputValidator::$_aPossibleCCType |
|
protected |
Initial value: array( 'mcd',
'vis',
'amx',
'dsc',
'dnc',
'jcb',
'swi',
'dlt',
'enr'
)
Definition at line 52 of file oxinputvalidator.php.
oxInputValidator::$_aRequiredCCFields |
|
protected |
Initial value: array( 'kktype',
'kknumber',
'kkmonth',
'kkyear',
'kkname',
'kkpruef'
)
Definition at line 32 of file oxinputvalidator.php.
oxInputValidator::$_aRequiredDCFields |
|
protected |
Initial value: array( 'lsbankname',
'lsktonr',
'lsktoinhaber'
)
Definition at line 68 of file oxinputvalidator.php.
oxInputValidator::$_instance = null |
|
staticprivate |
const oxInputValidator::INVALID_ACCOUNT_NUMBER = -5 |
const oxInputValidator::INVALID_BANK_CODE = -4 |
The documentation for this class was generated from the following file: