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