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/rospirotorg.ru/bitrix/modules/mobileapp/lib/janative/entity/ |
Upload File : |
<?php namespace Bitrix\MobileApp\Janative\Entity; use Bitrix\Main\IO\File; use Bitrix\Main\IO\Path; /** * @property array $extensions * @property array $dynamicData */ class Config { private ?string $path; private array $config = []; public function __construct($path) { $this->path = Path::normalize($path); $file = new File($this->path); if ($file->isExists()) { $content = include($this->path); if (is_array($content)) { $this->config = $content; } } } public function __get($name) { $config = $this->config; if ($name == "extensions") { if (array_keys($config) !== range(0, count($config) - 1) && array_key_exists('extensions', $config)) { return $config['extensions']; } else { return []; } } elseif ($name == "dynamicData") { return $config['dynamicData'] ?? []; } } }