Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
flagregistry.php
1<?php
2
4
6
8{
10
11 private array $flags;
12
13 public function setFlag(string $name)
14 {
15 $this->flags[$name] = true;
16 }
17
18 public function resetFlag(string $name)
19 {
20 if (array_key_exists($name, $this->flags))
21 {
22 unset($this->flags[$name]);
23 }
24 }
25
26 public function isFlag(string $name): bool
27 {
28 return $this->flags[$name] ?? false;
29 }
30}