src/Ease/Shared.php
public function loadConfig($configFile, $defineConstants = false)
    {
        if (!file_exists($configFile)) {
            throw new Exception('Config file '.(realpath($configFile) ? realpath($configFile)
                    : $configFile).' does not exist');
        }
        $configuration = json_decode(file_get_contents($configFile), true);
        if (empty($configuration)) {
            $this->addStatusMessage('Empty Config File '.realpath($configFile) ? realpath($configFile)
                        : $configFile, 'debug');
        } else {
            foreach ($configuration as $configKey => $configValue) {
                if ($defineConstants && (strtoupper($configKey) == $configKey) && (!defined($configKey))) {
                    define($configKey, $configValue);
                } else {
                    $this->setConfigValue($configKey, $configValue);
                }
                $this->configuration[$configKey] = $configValue;
            }
        }

        if (array_key_exists('debug', $this->configuration)) {
            $this->debug = boolval($this->configuration['debug']);
        }

        return $this->configuration;
    }
public function loadConfig($configFile, $defineConstants = false)
    {
        if (!file_exists($configFile)) {
            throw new Exception('Config file '.(realpath($configFile) ? realpath($configFile)
                    : $configFile).' does not exist');
        }
        $configuration = json_decode(file_get_contents($configFile), true);
        if (empty($configuration)) {
            $this->addStatusMessage('Empty Config File '.realpath($configFile) ? realpath($configFile)
                        : $configFile, 'debug');
        } else {
            foreach ($configuration as $configKey => $configValue) {
                if ($defineConstants && (strtoupper($configKey) == $configKey) && (!defined($configKey))) {
                    define($configKey, $configValue);
                } else {
                    $this->setConfigValue($configKey, $configValue);
                }
                $this->configuration[$configKey] = $configValue;
            }
        }

        if (array_key_exists('debug', $this->configuration)) {
            $this->debug = boolval($this->configuration['debug']);
        }

        return $this->configuration;
    }
Load Configuration values from json file $this->configFile and define UPPERCASE keys

@param string  $configFile      Path to file with configuration
@param boolean $defineConstants false to do not define constants

@return array full configuration array