HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/backip-old-files/administrator/components/com_acym/library/parameter.php
<?php
defined('_JEXEC') or die('Restricted access');
?><?php

class acymParameter
{
    public function __construct($params = null)
    {
        if (is_string($params)) {
            $this->params = json_decode($params);
        } elseif (is_object($params)) {
            $this->paramObject = $params;
        } elseif (is_array($params)) {
            $this->params = (object)$params;
        }
    }

    public function get($path, $default = null)
    {
        if (empty($this->paramObject)) {
            if (empty($this->params->$path) && !(isset($this->params->$path) && $this->params->$path === '0')) {
                return $default;
            }

            return $this->params->$path;
        } else {
            $value = $this->paramObject->get($path, 'noval');
            if ($value === 'noval') {
                $value = $this->paramObject->get('data.'.$path, $default);
            }

            return $value;
        }
    }
}