Loads a config file

@param string              $name
@param null|string|boolean $group

@return array|null
17576
public function load($name, $group = null)
	{
		if ($group === true)
		{
			$group = pathinfo($name, PATHINFO_FILENAME);
		}

		if ($group and $cached = $this->get($group))
		{
			return $cached;
		}

		$name = $this->ensureDefaultFormat($name);
		$paths = $this->finder->findAllFiles($name);

		if (empty($paths))
		{
			return false;
		}

		$config = array();

		foreach ($paths as $path)
		{
			$extension = pathinfo($path, PATHINFO_EXTENSION);
			$handler = $this->getHandler($extension);
			$config = Arr::merge($config, $handler->load($path));
		}

		if ($group)
		{
			$this->set($group, $config);
		}
		elseif ($group === null)
		{
			$this->merge($config);
		}

		return $config;
	}
1021639
public function getVariable($group, $name)
    {
        $variables = $this->getVariables($group);

        return array_key_exists($name, $variables) ? $variables[$name] : null;
    }
357077
protected function loadFile($name)
    {
        $blueprint = new Blueprint($name);

        if (\is_array($this->search) || \is_object($this->search)) {
            // Page types.
            $blueprint->setOverrides($this->search);
            $blueprint->setContext('blueprints://pages');
        } else {
            $blueprint->setContext($this->search);
        }

        return $blueprint->load()->init();
    }
215684
public function getTabFromGroup(string $name, string $group): TabInterface
    {
        if (!isset($this->tabGroups[$group])) {
            throw new \InvalidArgumentException(sprintf('Requested group named "%s" is not found. Did you forget to tag the service?', $group));
        }

        foreach ($this->tabGroups[$group]->getTabs() as $tab) {
            if ($tab->getName() === $name) {
                return $tab;
            }
        }

        throw new \InvalidArgumentException(sprintf('Requested tab "%s" from group "%s" is not found. Did you forget to tag the service?', $name, $group));
    }
304881
protected function loadData(string $name)
	{
		if (isset($this->data[$name])) return $this->data[$name];
		else return null;
	}
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;
            }
        }
    }
1273360
private function getGroupByName($name)
    {
        foreach (Craft::$app->sites->getAllGroups() as $group) {
            if ($group->name === $name) {
                return $group;
            }
        }
        return null;
    }
52734
public static function get($name)
	{
		return isset(self::$configParams[$name])
			? self::$configParams[$name]
			: null;
	}
120434
public function findByName($name)
	{
		$model = $this->createModel();

		$group = $model->where('name', '=', $name)->find();

		if ( ! $group->loaded() )
		{
			throw new GroupNotFoundException("A group could not be found with the name [$name].");
		}

		return $group;
	}
608373
public function getVar($name)
    {
		$this->loadVars();
    
        if (isset($this->_config[$name])) {
            return $this->_config[$name];
        } else {
            return false;
        }
    }
1324648
public function newSwitch($name, $group = null)
    {
        $arg = OptionItem::createSwitch($name);

        if ($this->obj_color->opt) {
            $arg->color($this->obj_color->opt);
        }

        if ($this->obj_color->bold) {
            $arg->bold();
        }

        self::add($arg, $group);

        return self::getOpt($name);
    }
1055405
public function load(string $environment, string $group, ?string $namespace = null): array
    {
        $items = [];

        // First we'll get the root configuration path for the environment which is
        // where all of the configuration files live for that namespace, as well
        // as any environment folders with their specific configuration items.
        $path = $this->getPath($namespace);

        if (\is_null($path)) {
            return $items;
        }

        // First we'll get the main configuration file for the groups. Once we have
        // that we can check for any environment specific files, which will get
        // merged on top of the main arrays to make the environments cascade.
        $file = "{$path}/{$group}.php";

        if ($this->files->exists($file)) {
            $items = $this->files->getRequire($file);
        }

        // Finally we're ready to check for the environment specific configuration
        // file which will be merged on top of the main arrays so that they get
        // precedence over them if we are currently in an environments setup.
        $file = "{$path}/{$environment}/{$group}.php";

        if ($this->files->exists($file)) {
            $items = $this->mergeEnvironment($items, $file);
        }

        return $items;
    }
920215
public function getConfig($name) {
        $data = $this->get($name);
        if ($data === null) {
            return null;
        }
        if (isset($this->data['global'])) {
            $data['global'] = $this->data['global'];
        }
        $config = new self();
        $config->load($data);
        return $config;
    }
4076
public static function loadFile( $file, $name ) {

		if( !isset( $file ) ) {

			$file	= new File();
		}

		$file->load( Yii::$app->request->post(), $name );

		return $file;
	}
603921
protected function getBuildConfig($group)
    {
        if (!$this->buildRepository || !$this->checkBuilds) {
            return null;
        }

        if (!$this->buildRepository->has($group)) {
            return null;
        }

        $config = $this->buildRepository->getOrFail($group);

        $config->target();

        if (!$this->mergeOption(self::CHECK_COMPILED_FILE_EXISTS, $config->managerOptions())) {
            return $config;
        }

        if (!$this->buildRepository->compiledFileExists($config)) {
            return null;
        }

        return $config;
    }
793455
public function load($locale, $group, $namespace = null)
    {
        $results = [];
        foreach ($this->loaders as $loader) {
            $results = array_merge($results, $loader->load($locale, $group, $namespace));
        }

        return $results;
    }
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];
	}