<?php

namespace FOP;

class Validators {
  
  

  
  

    // --- Statische Methoden ---
  
  public static function iban_checker($x) { 
    
    
    // --- BLOCK: main ---
    
		if (!$x) return;
		$x = preg_replace('/[^A-Z0-9]/', '', $x);
		$s = substr($x, 4) . strval(ord($x[0])-55) . strval(ord($x[1])-55) . substr($x, 2, 2);
		$r = 0;
		for ($i = 0; $i < strlen($s); $i++) {
			$r = (10 * $r + intval($s[$i])) % 97;
		}
		if ($r != 1) {
			throw new \FOP\AccessDeniedException('IBAN check failed');
		}
	
    
  }


  
  

  
  
}



