OXID eShop CE
6.4.2
|
Public Member Functions | |
__construct () | |
validateBasketAmount ($amount) | |
checkLogin ($user, $login, $invAddress) | |
checkEmail ($user, $email) | |
checkPassword ($user, $newPassword, $confirmationPassword, $shouldCheckPasswordLength=false) | |
getPasswordLength () | |
checkRequiredFields ($user, $billingAddress, $deliveryAddress) | |
checkCountries ($user, $invAddress, $deliveryAddress) | |
checkVatId ($user, $invAddress) | |
getFieldValidationErrors () | |
getFirstValidationError () | |
validatePaymentInputData ($paymentId, &$dynamicValue) | |
addValidationError ($fieldName, $error) | |
setCompanyVatInValidator ($companyVatInValidator) | |
getCompanyVatInValidator ($country) | |
Public Attributes | |
const | INVALID_ACCOUNT_NUMBER = -5 |
const | INVALID_BANK_CODE = -4 |
Protected Member Functions | |
_getCountry ($countryId) | |
_addValidationError ($fieldName, $error) | |
_validateDebitNote ($debitInformation) | |
_validateOldDebitInfo ($debitInfo) | |
_fixAccountNumber ($debitInfo) | |
_isAllBankInformationSet ($requiredFields, $bankInformation) | |
_cleanDebitInformation ($debitInformation) | |
_hasRequiredParametersForVatInCheck ($invAddress) | |
Protected Attributes | |
$_aRequiredCCFields | |
$_aInputValidationErrors = [] | |
$_oCompanyVatInValidator = null | |
$_aPossibleCCType | |
$_aRequiredDCFields | |
Private Member Functions | |
_setFields ($object, $fields) | |
Class for validating input.
OxidEsales\EshopCommunity\Core\InputValidator::__construct | ( | ) |
Class constructor. The constructor is defined in order to be possible to call parent::__construct() in modules.
|
protected |
Used to collect user validation errors. This method is called from all of the input checking functionality to report found error.
|
protected |
Clean up spaces.
array | $debitInformation | Debit information. |
|
protected |
If account number is shorter than 10, add zeros in front of number.
array | $debitInfo | Debit info. |
|
protected |
Load and return Country object.
string | $countryId |
|
protected |
Check if all need parameters entered.
array | $invAddress | Address. |
|
protected |
Checks if all bank information is set.
array | $requiredFields | fields must be set. |
array | $bankInformation | actual information. |
|
private |
Creates oxAddress object from given array.
User | Address | $object | |
array | $fields |
|
protected |
Validates debit note.
array | $debitInformation | Debit information |
|
protected |
Validates old debit info.
array | $debitInfo | Debit info |
OxidEsales\EshopCommunity\Core\InputValidator::addValidationError | ( | $fieldName, | |
$error | |||
) |
Used to collect user validation errors. This method is called from all of the input checking functionality to report found error.
string | $fieldName | |
StandardException | $error |
OxidEsales\EshopCommunity\Core\InputValidator::checkCountries | ( | $user, | |
$invAddress, | |||
$deliveryAddress | |||
) |
Checks if user defined countries (billing and delivery) are active.
User | $user | Active user. |
array | $invAddress | Billing address info. |
array | $deliveryAddress | Delivery address info. |
OxidEsales\EshopCommunity\Core\InputValidator::checkEmail | ( | $user, | |
) |
Checks if email (used as login) is not empty and is valid.
User | $user | Active user. |
string | User email/login. |
OxidEsales\EshopCommunity\Core\InputValidator::checkLogin | ( | $user, | |
$login, | |||
$invAddress | |||
) |
Checks if user name does not break logic:
User | $user | Active user. |
string | $login | User preferred login name. |
array | $invAddress | User information. |
OxidEsales\EshopCommunity\Core\InputValidator::checkPassword | ( | $user, | |
$newPassword, | |||
$confirmationPassword, | |||
$shouldCheckPasswordLength = false |
|||
) |
Checking if user password is fine. In case of error exception is thrown
User | $user | Active user. |
string | $newPassword | New user password. |
string | $confirmationPassword | Retyped user password. |
bool | $shouldCheckPasswordLength | Option to check password length. |
OxidEsales\EshopCommunity\Core\InputValidator::checkRequiredFields | ( | $user, | |
$billingAddress, | |||
$deliveryAddress | |||
) |
Checking if all required fields were filled. In case of error exception is thrown
User | $user | Active user. |
array | $billingAddress | Billing address. |
array | $deliveryAddress | Delivery address. |
OxidEsales\EshopCommunity\Core\InputValidator::checkVatId | ( | $user, | |
$invAddress | |||
) |
Checks if user passed VAT id is valid. Exception is thrown if id is not valid.
User | $user | Active user. |
array | $invAddress | User input array. |
OxidEsales\EshopCommunity\Core\InputValidator::getCompanyVatInValidator | ( | $country | ) |
Return VAT IN validator.
\OxidEsales\Eshop\Application\Model\Country | $country | Country according which VAT id should be checked. |
OxidEsales\EshopCommunity\Core\InputValidator::getFieldValidationErrors | ( | ) |
Returns error array if input validation for current field and rule reported an error
OxidEsales\EshopCommunity\Core\InputValidator::getFirstValidationError | ( | ) |
Returns first user input validation error.
OxidEsales\EshopCommunity\Core\InputValidator::getPasswordLength | ( | ) |
Min length of password.
OxidEsales\EshopCommunity\Core\InputValidator::setCompanyVatInValidator | ( | $companyVatInValidator | ) |
VAT IN validator setter.
\OxidEsales\Eshop\Core\CompanyVatInValidator | $companyVatInValidator | validator |
OxidEsales\EshopCommunity\Core\InputValidator::validateBasketAmount | ( | $amount | ) |
Validates basket amount.
float | $amount | Amount of article. |
ArticleInputException | If amount is not numeric or smaller 0. |
OxidEsales\EshopCommunity\Core\InputValidator::validatePaymentInputData | ( | $paymentId, | |
& | $dynamicValue | ||
) |
Validates payment input data for credit card and debit note.
string | $paymentId | The payment id of current payment. |
array | $dynamicValue | Values of payment. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const OxidEsales\EshopCommunity\Core\InputValidator::INVALID_ACCOUNT_NUMBER = -5 |
Invalid account number error code for template.
const OxidEsales\EshopCommunity\Core\InputValidator::INVALID_BANK_CODE = -4 |
Invalid bank number error code for template.