Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/calendar/lib/sync/util/ |
Upload File : |
<?php namespace Bitrix\Calendar\Sync\Util; use Bitrix\Calendar\Sync; use Bitrix\Calendar\Core; /** * @property Core\Section\Section|null $section * @property mixed|null $server * @property mixed|null $sync * @property Sync\Connection\SectionConnection|null $sectionConnections * @property Core\Section\SectionMap|null sections * @property Sync\Connection\ConnectionMap|null connections * @property Sync\Connection\EventConnectionMap|null eventConnections */ class Context { /** * @var array */ private array $data; public function __construct(array $data = []) { $this->data = $data; } public function __get($name) { return $this->data[$name] ?? null; } public function __set($name, $value) { $this->data[$name] = $value; } public function __isset($name) { return isset($this->data[$name]); } /** * you should add property * e.g. you should add service data * * @param string $property * @param mixed $value * * @return $this */ public function add(string $type, string $property, $value): Context { $this->data[$type][$property] = $value; return $this; } /** * merge Context * * @param Context $context * @return $this */ public function merge(Context $context): Context { $this->data = array_merge($this->data, $context->data); return $this; } /** * @param string $key * * @return mixed */ public function getByKey(string $key) { if (isset($this->data[$key])) { return null; } return $this->data[$key]; } }