| 1 | <?php |
||
| 12 | abstract class BaseImplementation implements OutputInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var integer |
||
| 16 | */ |
||
| 17 | protected $maxValue = 0; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var integer |
||
| 21 | */ |
||
| 22 | protected $minValue = 0; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param array $options |
||
| 26 | */ |
||
| 27 | 53 | public function __construct(array $options = []) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | 53 | public function output($value) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Set the options associated via this output interface |
||
| 44 | * |
||
| 45 | * @param array $options |
||
| 46 | * @return void |
||
| 47 | */ |
||
| 48 | 19 | protected function setOptions(array $options) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Validate given value |
||
| 54 | * |
||
| 55 | * @param integer $value |
||
| 56 | * @return void |
||
| 57 | */ |
||
| 58 | 51 | protected function validate($value) |
|
| 65 | |||
| 66 | /** |
||
| 67 | * Serialize a valid value into a character |
||
| 68 | * |
||
| 69 | * @param integer $value |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | abstract protected function outputValidValue($value); |
||
| 73 | } |