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/cvetdv.ru/bitrix/modules/yandex.market/lib/migration/ |
Upload File : |
<?php namespace Yandex\Market\Migration; use Bitrix\Main; use Yandex\Market; class Controller { public static function canRestore($exception) { return static::callEntity('canRestore', [$exception]); } public static function check() { return static::callEntity('check'); } public static function reset() { return static::callEntity('reset'); } protected static function callEntity($method, $arguments = null) { $entities = static::getEntityList(); $result = null; foreach ($entities as $className) { $callResult = null; if (!method_exists($className, $method)) { // nothing } else if ($arguments !== null) { $callResult = call_user_func_array([$className, $method], $arguments); } else { $callResult = $className::$method(); } if ($result === null || $callResult) { $result = $callResult; } } return $result; } protected static function getEntityList() { return [ Storage::class, Agent::class, Event::class, File::class, ]; } }