1 | <?php |
||
8 | class Vatin implements VatinInterface |
||
9 | { |
||
10 | /** @var Validator */ |
||
11 | private static $validator; |
||
12 | /** @var string */ |
||
13 | private $vatin; |
||
14 | |||
15 | /** |
||
16 | * Vatin constructor. |
||
17 | * |
||
18 | * Checks if the VAT identification number is correctly formatted. If it isn\'t, an exception is thrown. |
||
19 | * |
||
20 | * The constructor does NOT check if the VAT IN exists. It only checks the format. If you also want to check for the |
||
21 | * existence, use the Eventjet\Vatin\VatinFactory instead. |
||
22 | * |
||
23 | * @param string $vatin |
||
24 | * @throws InvalidVatinFormatException If the format is invalid |
||
25 | */ |
||
26 | 8 | public function __construct($vatin) |
|
36 | |||
37 | /** |
||
38 | * @return Validator |
||
39 | */ |
||
40 | 8 | private static function getValidator() |
|
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | 3 | public function __toString() |
|
55 | } |
||
56 |