| 1 | <?php |
||
| 10 | abstract class AbstractFeatureJudge extends Judge implements FeatureJudgeInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $features = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor. |
||
| 19 | * |
||
| 20 | * @param AdapterInterface $adapter |
||
| 21 | * @param array $voters |
||
| 22 | */ |
||
| 23 | 35 | public function __construct(AdapterInterface $adapter, array $voters = []) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Reloads the features from the adapter. |
||
| 31 | */ |
||
| 32 | 35 | public function reloadFeatures() |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | abstract public function decide($feature, $user = null, $defaultIfNotFound = false); |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | abstract public function featureExists($feature); |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | abstract public function getFeature($feature); |
||
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | abstract public function getFeatures(); |
||
| 56 | } |
||
| 57 |