6 declare(strict_types=1);
39 private $configs = [];
66 private $exemptions = [];
75 $this->state = $state;
76 $this->configs = $configs;
77 $this->exemptions = $exemptions;
88 && preg_match(
'/(?<group>(?<section>.*?)\/.*?)\/.*?/',
$path, $match)) {
90 $section = $match[
'section'];
91 $exemptions = array_keys($this->exemptions);
94 $checkedItems[] = $itemPath;
95 if (!empty($this->configs[$itemPath])) {
96 return $this->configs[$itemPath] === static::HIDDEN
97 && empty(array_intersect($checkedItems, $exemptions));
114 if (!empty($this->configs[
$path])) {
115 return $this->configs[
$path] === static::DISABLED;
118 $position = strripos(
$path,
'/');
119 if ($position ===
false) {
135 private function normalizePath(
$path)
137 return trim(
$path,
'/');
__construct(State $state, array $configs=[], array $exemptions=[])