25 public static function getOfdList($params, $page, $server)
27 Sale\Helpers\Rest\AccessChecker::checkAccessPermission();
29 return array_keys(self::getOfdHandlersMap());
38 public static function getOfdSettings($params, $page, $server)
40 Sale\Helpers\Rest\AccessChecker::checkAccessPermission();
42 self::checkParamsBeforeOfdSettingsGet($params);
44 $ofdHandlersMap = self::getOfdHandlersMap();
46 $ofdClass = $ofdHandlersMap[$params[
'OFD']];
47 return $ofdClass::getSettings();
54 private static function checkParamsBeforeOfdSettingsGet(array $params)
56 if (empty($params[
'OFD']))
58 throw new Rest\RestException(
'Parameter OFD is not defined', self::ERROR_CHECK_FAILURE);
61 $ofdHandlersMap = self::getOfdHandlersMap();
62 if (!isset($ofdHandlersMap[$params[
'OFD']]))
71 private static function getOfdHandlersMap(): array
77 $ofdHandlers = array_keys(
Sale\Cashbox\Ofd::getHandlerList());
79 foreach ($ofdHandlers as $handler)
81 $result[$handler::getCode()] = $handler;
static includeModule($moduleName)