Load config data

@param string $name Config name

@return array
344690
public function load($name)
  {
    if (isset($this->_data[$name])) {
      if (is_null($this->_data[$name])) {
        $data = array();
      } else {
        $data = $this->_data[$name];
      }
    } else {
      if (is_null($this->_stored)) {
        $data = array();
      } else {
        $data = $this->_stored->load($name);
      }
    }
    
    return $data;
  }
1367053
static function load($name){

		if($name == ''){
			return self::$data;
		}
		$name = Loader::getName($name,'config');
		$key = $name->app.'.'.$name->class;
		
		if(!isset(static::$data[$key])){
			// file config is exist?
			if(!file_exists($name->path)){
				user_error('Config '.$name->path.' Not Found');
				exit;
			}
			self::$data[$key] = (require_once $name->path);
		}
		return self::$data[$key];
	}
129430
public final function getHeader($name): array
   {
       $key = $this->parseHeaderName($name);
       return array_key_exists($key, $this->header) ? $this->header[$key] : [];
   }
172351
private function getConfigObjectFromDatabase($name)
    {
        // Load config from DB
        $config = $this->app->db->conn()->prepare(
            'SELECT * FROM ' . $this->app->db->getPrefix() . 'config
                          WHERE `config_name` = ? LIMIT 1');
        $config->execute(array($name));
        $config = $config->fetch(\PDO::FETCH_ASSOC);

        // Load corresponding class and get config array
        return $this->createConfigObject($config['config_name'], $config['config_data'], true);
    }
1120833
protected function getConfigure(string $name): ?array
    {
        if (isset($this->config[$name])) {
            return $this->config[$name];
        }

        if (!isset($this->abstractAlias[$name])) {
            return null;
        }

        foreach ($this->abstractAlias[$name] as $alias) {
            if (isset($this->config[$alias])) {
                return $this->config[$alias];
            }
        }

        return null;
    }
614655
final public function getConfig($name = '')
    {
        static $_config = [];
        if (empty($name)) {
            $name = $this->getName();
        }
        if (isset($_config[$name])) {
            return $_config[$name];
        }
        $map['name']   = $name;
        $map['status'] = 1;
        $config        = [];
        if (is_file($this->config_file)) {
            $temp_arr = include $this->config_file;
            foreach ($temp_arr as $key => $value) {
                if ($value['type'] == 'group') {
                    foreach ($value['options'] as $gkey => $gvalue) {
                        foreach ($gvalue['options'] as $ikey => $ivalue) {
                            $config[$ikey] = $ivalue['value'];
                        }
                    }
                } else {
                    $config[$key] = $temp_arr[$key]['value'];
                }
            }
            unset($temp_arr);
        }
        $_config[$name] = $config;

        return $config;
    }
669996
protected static function _defaultConfig($name)
    {
        $defaults = [
            'php' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                ]
            ],
            'cake' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                    'session.serialize_handler' => 'php',
                    'session.use_cookies' => 1,
                    'session.save_path' => TMP . 'sessions',
                    'session.save_handler' => 'files'
                ]
            ],
            'cache' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                    'session.use_cookies' => 1,
                    'session.save_handler' => 'user',
                ],
                'handler' => [
                    'engine' => 'CacheSession',
                    'config' => 'default'
                ]
            ],
            'database' => [
                'cookie' => 'CAKEPHP',
                'ini' => [
                    'session.use_trans_sid' => 0,
                    'session.use_cookies' => 1,
                    'session.save_handler' => 'user',
                    'session.serialize_handler' => 'php',
                ],
                'handler' => [
                    'engine' => 'DatabaseSession'
                ]
            ]
        ];

        if (isset($defaults[$name])) {
            return $defaults[$name];
        }

        return false;
    }
244878
protected function getGroup(string $name): array
    {
        if (!$this->container->has('config_'.$name)) {
            $this->loadGroup($name);
        }

        return $this->container->get('config_'.$name);
    }
294336
function conf($name, $default = NULL)
	{
		return array_key_exists($name, $this->__config) ? $this->__config[$name] : $default;
	}
729444
public function __getData(string $name)
    {
        if (isset($this->data[$name])) {
            return $this->data[$name];
        }

        return null;
    }
987862
public function configure($name)
    {
        if (isset($this->loadedConfigurations[$name])) {
            return;
        }
        //标记为已加载
        $this->loadedConfigurations[$name] = true;
        $path = $this->getConfigurationPath($name);
        if ($path) {
            $this->make('config')->set($name, require $path);
        }
    }
289979
public function loadConfigValue($name)
    {
        $feConfig = $this->iniConfig->getFeConfig($name);
        $section = $this->feConfigFallback[$name][static::SECTION];
        /** @var Model $model */
        $model = $this->pool->createClass('Brainworxx\\Krexx\\Service\\Config\\Model')
            ->setSection($section)
            ->setEditable($feConfig[0])
            ->setType($feConfig[1]);

        // Do we accept cookie settings here?
        if ($feConfig[0] === true) {
            $cookieSetting = $this->cookieConfig->getConfigFromCookies($section, $name);
            // Do we have a value in the cookies?
            if ($cookieSetting  !== null &&
                ($name === static::SETTING_DISABLED && $cookieSetting === static::VALUE_FALSE) === false
            ) {
                // We must not overwrite a disabled=true with local cookie settings!
                // Otherwise it could get enabled locally, which might be a security
                // issue.
                $model->setValue($cookieSetting)->setSource('Local cookie settings');
                $this->settings[$name] = $model;
                return $this;
            }
        }

        // Do we have a value in the ini?
        $iniSettings = $this->iniConfig->getConfigFromFile($section, $name);
        if (isset($iniSettings) === true) {
            $model->setValue($iniSettings)->setSource('Krexx.ini settings');
            $this->settings[$name] = $model;
            return $this;
        }

        // Nothing yet? Give back factory settings.
        $model->setValue($this->feConfigFallback[$name][static::VALUE])->setSource('Factory settings');
        $this->settings[$name] = $model;

        return $this;
    }
46954
protected function loadConfiguration()
    {
        $configuration = null;

        if (file_exists(self::CONFIGURATION_FILENAME)) {
            $configuration = json_decode(file_get_contents(self::CONFIGURATION_FILENAME), true);
        }

        return $configuration ?: array();
    }
492616
public function getData($name)
    {
        return isset($this->builderConfig[$name]) ? $this->builderConfig[$name] : null;
    }
1130534
private function loadConfigData()
    {
        //Load config data
        $config = laradooConfig();


        $this->suffix = array_key_exists('api-suffix', $config) ? $config['api-suffix'] : $this->suffix;
        $this->suffix = laradooAddCharacter($this->suffix, '/');

        $this->host = array_key_exists('host', $config) ? $config['host'] : $this->host;
        $this->host = laradooRemoveCharacter($this->host, '/');

        $this->db = array_key_exists('db', $config) ? $config['db'] : $this->db;
        $this->username = array_key_exists('username', $config) ? $config['username'] : $this->username;
        $this->password = array_key_exists('password', $config) ? $config['password'] : $this->password;
    }
311277
public function getData($name = null)
    {
        if ($name === null) {
            return $this->config['data'];
        } elseif (isset($this->config['data'][$name])) {
            return $this->config['data'][$name];
        } else {
            return null;
        }
    }
133677
public function loadConfig($name)
    {
        // only if config not yet exists
        if (!$this->configExists($name))
            $this->config[$name] = $this->getConfigObjectFromDatabase($name);
    }