1 | <?php |
||
30 | class Tx_FeatureFlag_Service |
||
31 | { |
||
32 | /** |
||
33 | * @var int |
||
34 | */ |
||
35 | const BEHAVIOR_HIDE = 0; |
||
36 | |||
37 | /** |
||
38 | * @var int |
||
39 | */ |
||
40 | const BEHAVIOR_SHOW = 1; |
||
41 | |||
42 | /** |
||
43 | * @var Tx_FeatureFlag_Domain_Repository_FeatureFlag |
||
44 | */ |
||
45 | private $featureFlagRepository; |
||
46 | |||
47 | /** |
||
48 | * @var \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface |
||
49 | */ |
||
50 | private $persistenceManager; |
||
51 | |||
52 | /** |
||
53 | * @var Tx_FeatureFlag_System_Typo3_Configuration |
||
54 | */ |
||
55 | private $configuration; |
||
56 | |||
57 | /** |
||
58 | * @var array |
||
59 | */ |
||
60 | private $cachedFlags = array(); |
||
61 | |||
62 | /** |
||
63 | * Tx_FeatureFlag_Service constructor. |
||
64 | * @param Tx_FeatureFlag_Domain_Repository_FeatureFlag $featureFlagRepository |
||
65 | * @param \TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface $persistenceManager |
||
66 | * @param Tx_FeatureFlag_System_Typo3_Configuration $configuration |
||
67 | */ |
||
68 | 5 | public function __construct( |
|
77 | |||
78 | /** |
||
79 | * @param $flag |
||
80 | * @return Tx_FeatureFlag_Domain_Model_FeatureFlag |
||
81 | * @throws Tx_FeatureFlag_Service_Exception_FeatureNotFound |
||
82 | * @return boolean |
||
83 | */ |
||
84 | 3 | protected function getFeatureFlag($flag) |
|
95 | |||
96 | /** |
||
97 | * @param $flag |
||
98 | * @return bool |
||
99 | * @throws Tx_FeatureFlag_Service_Exception_FeatureNotFound |
||
100 | */ |
||
101 | 3 | public function isFeatureEnabled($flag) |
|
105 | |||
106 | /** |
||
107 | * @param $flag |
||
108 | * @param $enabled |
||
109 | * @throws Tx_FeatureFlag_Service_Exception_FeatureNotFound |
||
110 | * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException |
||
111 | */ |
||
112 | 1 | public function updateFeatureFlag($flag, $enabled) |
|
122 | |||
123 | /** |
||
124 | * Flags entries in database |
||
125 | */ |
||
126 | 1 | public function flagEntries() |
|
132 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.