| 1 | <?php |
||
| 10 | abstract class AbstractValueJudge extends Judge implements ValueJudgeInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $values = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor. |
||
| 19 | * |
||
| 20 | * @param AdapterInterface $adapter |
||
| 21 | * @param array $voters |
||
| 22 | */ |
||
| 23 | 26 | public function __construct(AdapterInterface $adapter, array $voters = []) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Reloads the values from the adapter. |
||
| 31 | */ |
||
| 32 | 26 | public function reloadValues() |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | abstract public function decide($value, $user = null, $defaultValue = false); |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | abstract public function valueExists($value); |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | abstract public function getValues(); |
||
| 51 | } |
||
| 52 |