Assemble an one-dimension array from an recursive traversable config

@param  Traversable $config
@return array
340391
protected function iteratorToArray(Traversable $config, $delimiter) {
		$rows = [];
		
		foreach ($config as $key => $value) {
			if ($value instanceof Traversable) {
				foreach ($this->iteratorToArray($value, $delimiter) as $subkey => $subvalue) {
					$rows[$key . $delimiter . $subkey] = $subvalue;
				}
			} else {
				$rows[$key] = $value;
			}
		}
		
		return $rows;
	}
1202924
public function addFieldsFromConfig(array $config)
    {
        $i = 1;
        foreach ($config as $name => $field) {
            if (is_numeric($name) && !isset($field[$name]['type'])) {
                $fields = [];
                foreach ($field as $n => $f) {
                    $fields[$n] = Fields::create($n, $f);
                }
                if ($i > 1) {
                    $this->fieldsets[$this->current]->createGroup();
                }
                $this->fieldsets[$this->current]->addFields($fields);
                $i++;
            } else {
                $this->addField(Fields::create($name, $field));
            }
        }
        return $this;
    }
1041946
public function config($config)
    {
        if (is_array($config)) {
            $this->config = array_merge($this->config, $config);
        } elseif (isset($this->config[$config])) {
            return $this->config[$config];
        } else {
            return;
        }
    }
1008926
public static function deserialize(array $config)
    {
        if (isset($config['class']) && isset($config['config'])) {
            $config = $config['config'];
        }
        $instance = new self();
        $instance->loadConfig($config);
        return $instance;
    }
5271
function configure($config = []) {
    $this->config = array_replace_recursive($this->config, $this->modes[@$config['mode'] ?: $this->config['mode']]);
    
    $this->config = array_replace_recursive($this->config, $config);
    
    return $this;
  }
430550
private function makeLocators(array $config): array
    {
        $locators = [];

        foreach ($config as $name => $binding) {
            if (is_string($binding)) {
                $target = $this->factory->make($binding);
            } else {
                $target = $binding->resolve($this->factory);
            }

            $locators[$name] = $target;
        }

        return $locators;
    }
1273374
public function build(array $config)
    {
        $default = [
            'class' => null,
            'type' => null,
            'arguments' => [],
            '_key' => null,
        ];
        $config = array_merge($default, $config);
        $componentBuilder = $this->components[$config['_key']] ?? null;
        if ($componentBuilder === null) {
            throw new \InvalidArgumentException(sprintf('Invalid "_key:%s" in configuration.', $config['_key']));
        }
        return $componentBuilder->make($config['class'], $config['type'], $config['arguments']);
    }
1061631
public function getConfigItems($config) {
		$config = strtolower($config);
		return isset($this->config[$config]) ? $this->config[$config] : array();
	}
1081956
public static function createFromConfig(array $config)
    {
        $fields = [];
        foreach ($config as $name => $field) {
            $fields[$name] = Fields::create($name, $field);
        }
        return new static($fields);
    }
903607
protected function buildSorts(array $config)
    {
        $sorts = [];

        foreach ((isset($config['sorts']) ? $config['sorts'] : []) as $name => $sort) {
            $sort = $this->buildSort(array_merge(['name' => $name], $sort), $config);
            $sorts[$sort->getName()] = $sort;
        }

        return $sorts;
    }
129434
protected function getConfig(array $config): array
    {
        $keys = [
            'auth_key',
            'secret',
            'app_id',
            'options',
            'host',
            'port',
            'timeout',
        ];

        foreach ($keys as $key) {
            if (!array_key_exists($key, $config)) {
                throw new InvalidArgumentException("Missing configuration key [$key].");
            }
        }

        foreach ($config['options'] as $option => $value) {
            if (is_null($value)) {
                unset($config['options'][$option]);
            }
        }

        return array_only($config, $keys);
    }
1242192
protected function buildSort(array $config, array $parentConfig)
    {
        return $this->sortBuilder->build($this->prepareConfig($config, $parentConfig));
    }
101354
protected function createYaml(array $config)
    {
        $nested = [];

        array_walk(array_dot($config), function ($value, $key) use (&$nested) {
            array_set($nested, $key, $value);
        });

        return $this->yaml->dump($nested, 4);
    }
1090951
protected function parseConfig($config)
    {
        $parsed = [];

        foreach ($config as $key=>$value) {
            if ($value instanceof XType) {
                $parsed[$key] = $value;
                continue;
            }
            $parsed[$key] = $this->stringToType($value);
        }

        return $parsed;
    }
823526
public function build(array $config)
    {
        $output = array();

        // Fix path in output dir
        if ('/' !== substr($config['output_dir'], -1) && strlen($config['output_dir']) > 0) {
            $config['output_dir'] .= '/';
        }

        // changed from css_preprocessor to css_preprocessor for 3.0
        if (in_array($config['css_preprocessor'], array('sass', 'scssphp'))) {
            $output['bootstrap_css'] = $this->buildCssWithSass($config);
        } elseif ('none' !== $config['css_preprocessor']) {
            $output['bootstrap_css'] = $this->buildCssWithLess($config);
        } else {
            $output['bootstrap_css'] = $this->buildCssWithoutLess($config);
        }

        $output['bootstrap_js'] = $this->buildJs($config);
        $output['jquery'] = $this->buildJquery($config);

        return $output;
    }
216512
public function path($config = array())
    {
        $config = new KObjectConfigJson($config);
        $config->append(array(
            'root'  => JPATH_ROOT,
        ));

        return parent::path($config);
    }
603802
public function load(array $config = [])
    {
        $this->config = array_replace_recursive($this->config, $config);

        $this->enviroment();
        $this->errors();
        $this->templates();
        $this->orm();
        $this->router();

        return $this;
    }