设置框架配置里的值,针对数组,以追加的形式添加
@param $name 如果name为数组，直接和$this->config合并
否则，直接和name对应对键合并，
@return mixed
326472
public static function set_merge($name, $value=null){
        if(is_array($name)) {
            self::$o->config = array_merge(self::$o->config,$name);
        }
        else {
            self::$o->config[$name] = array_merge(self::$o->config[$name],$value);
        }
        return true;
    }
818040
public function getConfig($name)
    {
        $setting = $this->settings;
        return isset($setting[$name]) ? $setting[$name] : null;
    }
970780
public function get($name = '')
	{
		// This needs to be extended by somebody else!
		if(!$this->_app->name)
			return [];

		// Not defined huh?
		if (!$this->_config)
			$this->getConfig();

		return $name ? (isset($this->_config['_'. $name]) ? $this->_config['_'. $name] : []) : $this->_config;
	}
1183810
private static function getConnectionConfiguration($name)
    {
        $databaseConfig = Configuration::get('database.connections');
        if (isset($databaseConfig[$name])) {
            $databaseConfig = $databaseConfig[$name];
        } else {
            $databaseConfig = null;
        }

        if ($databaseConfig === null) {
            throw new ConfigurationException("Database configuration for connection '" . $name . "' doesn't exists!");
        }

        if (! isset($databaseConfig['driver'])) {
            throw new ConfigurationException("Database configuration for connection '" . $name . "' is invalid!");
        }

        return $databaseConfig;
    }
952630
public static function cfg($name = '@default', $default = '') {
        $app  = self::$app;
        $keys = null;
        if ($name != null) {
            $names = explode('@', $name);
            if ($names[0]) {
                $name = $names[0];
                $keys = explode('.', $name);
                $name = array_shift($keys);
            } else {
                $name = null;
            }
            if (isset($names[1]) && $names[1]) {
                $config = $names[1];
            } else {
                $config = 'default';
            }
        } else {
            $config = 'default';
        }
        if (isset ($app->configs [ $config ])) {
            $confObj = $app->configs [ $config ];
        } else {
            $confObj = $app->configLoader->loadConfig($config);
            if (!$confObj) {
                $confObj = new Configuration ($config);
            }
            $app->configs [ $config ] = $confObj;
        }

        if ($name == null) {
            return $confObj;
        } else {
            $values = $confObj->get($name, $default);
            if ($keys && is_array($values)) {
                foreach ($keys as $ky) {
                    if (isset($values[ $ky ])) {
                        $values = $values[ $ky ];
                    }
                }
            }

            return $values;
        }
    }
125172
private function configCommand(string $name) : Result
    {
        $cmd = (new Get($this->repo->getRoot()));
        $cmd->name($name);

        return $this->runner->run($cmd);
    }
294336
function conf($name, $default = NULL)
	{
		return array_key_exists($name, $this->__config) ? $this->__config[$name] : $default;
	}
819101
public function getConfig($name = null)
    {
        if (!is_null($name)) {
            if (isset($this->_config[$name])) {
                return $this->_config[$name];
            } else {
                return null;
            }
        }

        return $this->_config;
    }
543729
public function get($name)
    {
        $config = $this->all;
        return isset($config[$name]) ? $config[$name] : null;
    }
759978
protected function configFor($name)
    {
        // Return cached result
        if (array_key_exists($name, $this->configs)) {
            return $this->configs[$name];
        }

        $config = Config::inst()->get(Injector::class, $name);
        $this->configs[$name] = $config;
        return $config;
    }
474585
public function getConfiguration($name, $section = null)
    {
        $configValue = null;

        if ($section === null) {
            if (array_key_exists($name, $this->config)) {
                $configValue = $this->config[$name];
            }
        } else {
            if (array_key_exists($section, $this->config)) {
                $sectionSettings = $this->config[$section];
                if (array_key_exists($name, $sectionSettings)) {
                    $configValue = $sectionSettings[$name];
                }
            }
        }

        return $configValue;
    }
845968
public function get($name)
    {
        switch (true) {
            case isset($this->active[$name]):
                return $this->values[$name];

            case isset($this->values[$name]):
                break;

            case \array_key_exists($name, $this->values):
                break;

            case isset($this->alias[$name]):
                $this->active[$name] = true;

                return $this->values[$name] = $this->get($this->alias[$name]);

            case isset($this->factory[$name]):
                $factory = $this->factory[$name];

                if (\is_string($factory) && \class_exists($factory)) {
                    $this->values[$name] = $this->create($factory, $this->factoryMap[$name]);
                } else {
                    $this->values[$name] = $this->call($factory, $this->factoryMap[$name]);
                }
                break;

            case \class_exists($name):
                return $this->build($name);

            default:
                throw new NotFoundException($name);
        }

        $this->active[$name] = true;


        if (null !== $configures = $this->getConfigure($name)) {
            foreach ($configures as $index => $config) {
                $value = $this->call($config, $this->configMap[$name][$index]);

                if ($value !== null) {
                    $this->values[$name] = $value;
                }
            }
        }

        return $this->values[$name];
    }
530232
public function get($name)
    {
        $item = $this->getItemPath($name);

        return $this->config->get($item);
    }
571650
public function config($name)
    {
        $message   = "Config does not exist: {$name}.";
        $fragments = explode('.', $name);
        // 判断一级配置是否存在
        $first = array_shift($fragments);
        if (!isset($this->$first)) {
            throw new \Mix\Exception\ConfigException($message);
        }
        // 判断其他配置是否存在
        $current = $this->$first;
        foreach ($fragments as $key) {
            if (!isset($current[$key])) {
                throw new \Mix\Exception\ConfigException($message);
            }
            $current = $current[$key];
        }
        return $current;
    }
899631
public function get($name)
    {
        $config = $this->manager->config;
        // 已加载
        if (isset($this->_instances[$name])) {
            return $this->_instances[$name];
        }
        // 未注册
        if (!isset($config[$name])) {
            throw new \Mix\Exception\ComponentException("Did not register this component: {$name}");
        }
        // 创建组件
        $object = Bean::newInstance($config[$name]['ref']);
        // 组件效验
        if (!($object instanceof ComponentInterface)) {
            throw new \Mix\Exception\ComponentException("This class is not a component: {$config[$name]['class']}");
        }
        // 装入容器
        $this->_instances[$name] = $object;
        // 返回
        return $this->_instances[$name];
    }
1036347
public function name($name = null)
    {
        if ($name !== null) {
            $this->config('name', $name);
        }

        return $this->config('name');
    }
173772
public function config_read($name) {
        global $CFG;
        if (!empty($this->plugin)) {
            $value = get_config($this->plugin, $name);
            return $value === false ? NULL : $value;

        } else {
            if (isset($CFG->$name)) {
                return $CFG->$name;
            } else {
                return NULL;
            }
        }
    }