1 | <?php |
||
10 | abstract class AbstractDetector implements DetectorInterface |
||
11 | { |
||
12 | const PLATE_TYPE_UNKNOWN = GermanyDetector::PLATE_TYPE_INVALID; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $licensePlate; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $normalizedLicensePlate; |
||
23 | |||
24 | /** |
||
25 | * @var string[] |
||
26 | */ |
||
27 | protected $seperatedLicensePlate; |
||
28 | |||
29 | /** |
||
30 | * @var LicensePlateResponse |
||
31 | */ |
||
32 | protected $response; |
||
33 | |||
34 | /** |
||
35 | * AbstractDetector constructor. |
||
36 | * |
||
37 | * @param $licensePlate |
||
38 | */ |
||
39 | public function __construct($licensePlate) |
||
50 | |||
51 | /** |
||
52 | * @return LicensePlateResponse |
||
53 | */ |
||
54 | public function getResponse() |
||
58 | |||
59 | /** |
||
60 | * @param string $licensePlate |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function normalize($licensePlate) |
||
76 | |||
77 | /** |
||
78 | * @param string $licensePlate |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | public function seperate($licensePlate) |
||
87 | |||
88 | /** |
||
89 | * @param string $string |
||
90 | * @param string $encoding |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | protected function mb_ucfirst($string, $encoding = null) |
||
106 | |||
107 | /** |
||
108 | * @return LicensePlateResponse |
||
109 | */ |
||
110 | abstract public function parse(); |
||
111 | } |
||
112 |