1 | <?php |
||
8 | class BIC implements FinancialInstitutionInterface |
||
9 | { |
||
10 | const PATTERN = '/^[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}$/'; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $bic; |
||
16 | |||
17 | /** |
||
18 | * Constructor |
||
19 | * |
||
20 | * @param string $bic |
||
21 | * |
||
22 | * @throws \InvalidArgumentException When the BIC does contain invalid characters or the length does not match. |
||
23 | */ |
||
24 | 8 | public function __construct($bic) |
|
32 | |||
33 | /** |
||
34 | * Returns a formatted representation of the BIC |
||
35 | * |
||
36 | * @return string The formatted BIC |
||
37 | */ |
||
38 | 5 | public function format() |
|
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 2 | public function asDom(\DOMDocument $doc) |
|
53 | } |
||
54 |