1 | <?php |
||
13 | class Result extends AbstractResult |
||
14 | { |
||
15 | const FORMAT_QR_CODE = 'QR_CODE'; |
||
16 | const FORMAT_EAN_13 = 'EAN_13'; |
||
17 | const FORMAT_CODE_39 = 'CODE_39'; |
||
18 | const FORMAT_CODE_128 = 'CODE_128'; |
||
19 | const FORMAT_INTERLEAVED_2_5 = 'INTERLEAVED_2_5'; |
||
20 | |||
21 | private static $prefix = [ |
||
22 | self::FORMAT_QR_CODE => 'QR-Code', |
||
23 | self::FORMAT_EAN_13 => 'EAN-13', |
||
24 | self::FORMAT_CODE_39 => 'CODE-39', |
||
25 | self::FORMAT_CODE_128 => 'CODE-128', |
||
26 | self::FORMAT_INTERLEAVED_2_5 => 'I2/5', |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * Pass in the raw result from the process |
||
31 | * |
||
32 | * @param string $text |
||
33 | * @param string $format |
||
34 | */ |
||
35 | public function __construct($text, $format) |
||
41 | |||
42 | /** |
||
43 | * Format of the bar code |
||
44 | * |
||
45 | * @param $format |
||
46 | */ |
||
47 | protected function format($format) |
||
54 | |||
55 | /** |
||
56 | * Just returns the text output |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function __toString() |
||
68 | } |
||
69 |