getGlobal(['output' => 'extend'], false) : API::Settings()->get(['output' => 'extend']); } else if (!$is_global && $param && !array_key_exists($param, self::$params)) { $settings = API::Settings()->get(['output' => 'extend']); self::$params = is_array($settings) ? ($settings + self::$params) : false; } if (self::$params === false) { throw new Exception(_('Unable to load settings API parameters.')); } } /** * Get value by global parameter name of API object (load parameters if need). * * @static * * @param string $name API object global parameter name. * * @return string|null Parameter value. If parameter not exists, return null. */ public static function getGlobal(string $name): ?string { self::loadParams($name, true); return array_key_exists($name, self::$params) ? self::$params[$name] : null; } /** * @return array */ public static function getDbVersionStatus(): array { $dbversion_status = json_decode((string) self::getGlobal(self::DBVERSION_STATUS), true); if (!is_array($dbversion_status)) { return []; } return $dbversion_status; } }