1 | <?php |
||
8 | class IbanSanitizer extends sanitizers\FieldSanitizer |
||
9 | { |
||
10 | |||
11 | const ENDPOINT = 'http://opendata.siteworkers.nl/openiban?bban='; |
||
12 | |||
13 | private $openIbanUsername, |
||
14 | $openIbanPassword; |
||
15 | |||
16 | function __construct ($openIbanUsername = null, $openIbanPassword = null) |
||
21 | |||
22 | /** |
||
23 | * @param $bban |
||
24 | * @return string |
||
25 | */ |
||
26 | private static function getRequestEndpoint ($bban) |
||
30 | |||
31 | public function describeObject () |
||
35 | |||
36 | public function isLive () |
||
40 | |||
41 | public function isRealtime () |
||
45 | |||
46 | public function sanitize ($value) |
||
57 | |||
58 | /** |
||
59 | * Converst BBAN number into IBAN number using the openiban API |
||
60 | * |
||
61 | * @param string $bban |
||
62 | * @param string $username |
||
63 | * @param string $password |
||
64 | * |
||
65 | * @return string|null |
||
66 | */ |
||
67 | private static function convertUsingOpenIban ($bban, $username, $password) |
||
80 | |||
81 | } |