1 | <?php |
||
11 | class IID implements FinancialInstitutionInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $iid; |
||
17 | |||
18 | /** |
||
19 | * Constructor |
||
20 | * |
||
21 | * @param string $iid |
||
22 | * |
||
23 | * @throws \InvalidArgumentException When the IID does contain invalid characters or the length does not match. |
||
24 | */ |
||
25 | 11 | public function __construct($iid) |
|
34 | |||
35 | /** |
||
36 | * Extracts the IID from an IBAN |
||
37 | * |
||
38 | * @param IBAN $iban |
||
39 | * |
||
40 | * @throws \InvalidArgumentException When the supplied IBAN is not from a supported country. |
||
41 | */ |
||
42 | 6 | public static function fromIBAN(IBAN $iban) |
|
50 | |||
51 | /** |
||
52 | * Returns a formatted representation of the IID |
||
53 | * |
||
54 | * @return string The formatted IID |
||
55 | */ |
||
56 | 1 | public function format() |
|
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | 3 | public function asDom(DOMDocument $doc) |
|
76 | } |
||
77 |