AbstractDigitList
class AbstractDigitList implements DigitList (View source)
Provides common functionality for different digit lists.
Properties
protected array | $digits | ||
protected int[] | $valueMap | ||
protected bool | $caseSensitive | ||
protected bool | $stringConflict |
Methods
Sets the value map and determines if it's case sensitive.
Tells if there is conflict that prevents numbers from being represented as a string.
Tells if the digits are case sensitive or not.
Returns all the digits in the list.
Returns the digit that represents the given value.
Returns the value for the given digit.
Returns the number of different digits.
Details
at line 29
protected
setValueMap(array $map)
Sets the value map and determines if it's case sensitive.
at line 36
bool
hasStringConflict()
Tells if there is conflict that prevents numbers from being represented as a string.
at line 41
bool
isCaseSensitive()
Tells if the digits are case sensitive or not.
at line 46
array
getDigits()
Returns all the digits in the list.
at line 51
mixed
getDigit(int $value)
Returns the digit that represents the given value.
at line 62
int
getValue(mixed $digit)
Returns the value for the given digit.
at line 77
int
count()
Returns the number of different digits.