-
Notifications
You must be signed in to change notification settings - Fork 7
/
FeatureInterface.php
59 lines (49 loc) · 1.2 KB
/
FeatureInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
namespace JoshuaEstes\Component\FeatureToggle;
use JoshuaEstes\Component\FeatureToggle\Toggle\FeatureToggleInterface;
/**
* All features must implement this interface.
*
* @author Joshua Estes <Joshua@Estes.in>
*/
interface FeatureInterface
{
/**
* The key is a unique identifier for the feature
*
* @param string $key
*/
public function setKey($key);
/**
* @return string
*/
public function getKey();
/**
* Descriptions can be set to allow users to get more information about
* what the feature does.
*
* @param string $description
*/
public function setDescription($description);
/**
* @return string
*/
public function getDescription();
/**
* Sets a feature toggle that is responsible for figuring out how the
* feature becomes enabled or disabled.
*
* @param FeatureToggleInterface $toggle
*/
public function setToggle(FeatureToggleInterface $toggle);
/**
* @return FeatureToggleInterface
*/
public function getToggle();
/**
* Checks to see if this feature is enabled or not.
*
* @return boolean
*/
public function isEnabled();
}