1 | <?php |
||
9 | class FeatureManager |
||
10 | { |
||
11 | /** @var FeatureRepositoryInterface */ |
||
12 | private $repository; |
||
13 | |||
14 | /** |
||
15 | * FeatureManager constructor. |
||
16 | * @param FeatureRepositoryInterface $repository |
||
17 | */ |
||
18 | 36 | public function __construct(FeatureRepositoryInterface $repository) |
|
22 | |||
23 | 6 | public function add($featureName, $isEnabled) |
|
28 | |||
29 | 6 | public function remove($featureName) |
|
34 | |||
35 | 6 | public function rename($featureOldName, $featureNewName) |
|
43 | |||
44 | 3 | public function enable($featureName) |
|
53 | |||
54 | 3 | public function disable($featureName) |
|
63 | |||
64 | 3 | public function isEnabled($featureName) |
|
70 | |||
71 | 3 | public function enableFor($featureName, FeaturableInterface $featurable) |
|
75 | |||
76 | 3 | public function disableFor($featureName, FeaturableInterface $featurable) |
|
80 | |||
81 | 3 | public function isEnabledFor($featureName, FeaturableInterface $featurable) |
|
85 | } |
||
86 |