1 | <?php |
||
11 | abstract class AbstractDigitList implements DigitList |
||
12 | { |
||
13 | /** @var array List of digits */ |
||
14 | protected $digits; |
||
15 | |||
16 | /** @var int[] List of digit values */ |
||
17 | protected $valueMap; |
||
18 | |||
19 | /** @var bool Tells if the digits are case sensitive or not */ |
||
20 | protected $caseSensitive; |
||
21 | |||
22 | /** @var bool Tells if the numeral system can be written using strings */ |
||
23 | protected $stringConflict; |
||
24 | |||
25 | /** |
||
26 | * Sets the value map and determines if it's case sensitive. |
||
27 | * @param int[] $map List of values for digits |
||
28 | */ |
||
29 | 270 | protected function setValueMap(array $map) |
|
35 | |||
36 | 141 | public function hasStringConflict() |
|
40 | |||
41 | 12 | public function isCaseSensitive() |
|
45 | |||
46 | 219 | public function getDigits() |
|
50 | |||
51 | 213 | public function getDigit($value) |
|
61 | |||
62 | 231 | public function getValue($digit) |
|
76 | |||
77 | 231 | public function count() |
|
81 | } |
||
82 |