private function IbanValidator::toBigInt in Plug 7
1 call to IbanValidator::toBigInt()
- IbanValidator::validate in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Constraints/ IbanValidator.php - Checks if the passed value is valid.
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Constraints/ IbanValidator.php, line 112
Class
- IbanValidator
- @author Manuel Reinhard <manu@sprain.ch> @author Michael Schummel @author Bernhard Schussek <bschussek@gmail.com>
Namespace
Symfony\Component\Validator\ConstraintsCode
private function toBigInt($string) {
$chars = str_split($string);
$bigInt = '';
foreach ($chars as $char) {
// Convert uppercase characters to ordinals, starting with 10 for "A"
if (ctype_upper($char)) {
$bigInt .= ord($char) - 55;
continue;
}
// Simply append digits
$bigInt .= $char;
}
return $bigInt;
}