9 protected static $instance;
32 SELECT feature, enabled_all, enabled_cu, params
35 $query = db_query($sql, $this->dbh);
37 throw new Exception(
'Could not read cufeaturegate table.');
39 $rows = db_fetch_all($query);
53 foreach ($data as $dataRow) {
54 $this->data[$dataRow[
'feature']] = [
55 'enabled_all' => $dataRow[
'enabled_all'],
56 'enabled_cu' => json_decode($dataRow[
'enabled_cu'],
true) ?? [],
57 'params' => json_decode($dataRow[
'params'],
true) ?? [],
73 return static::$instance;
83 return array_key_exists($feature, $this->data);
94 return $this->data[$feature];
HasFeature(String $feature)
GetFeatureData(String $feature)