1 | <?php |
||
8 | class QRReference |
||
9 | { |
||
10 | const PATTERN = '/^[0-9]{27}$/'; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $reference; |
||
16 | |||
17 | /** |
||
18 | * Constructor |
||
19 | * |
||
20 | * @param string $reference |
||
21 | * |
||
22 | * @throws \InvalidArgumentException When the reference is invalid. |
||
23 | */ |
||
24 | 2 | public function __construct($reference) |
|
32 | |||
33 | /** |
||
34 | * Returns a formatted representation of the reference |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | 2 | public function format() |
|
42 | } |
||
43 |