Merge the config in the provided path into what already exists. Existing config takes
priority over what is found in $path.

@param  string $path
@param  string $key
@return void
337354
public function mergeConfigFrom($path, $key)
    {
        $existing = $this->app->get(Config::class)->get($key, []);
        $this->app->get(Config::class)->set($key, array_merge(require $path, $existing));
    }
485177
protected function alreadyConfigured($key)
    {
        $config = $this->getClassMetadata()->getExtension($this->getExtensionName());

        return isset($config[$key]);
    }
582651
protected function loadConfigsFrom($path)
    {
        if (! $this->app->configurationIsCached()) {
            $files = $this->getConfigurationFiles($path);

            foreach ($files as $key => $path) {
                config()->set($key, require $path);
            }
        }
    }
165220
public function merge($key, $value = null)
    {
        if (is_array($key)) {
            $this->elements = array_merge($this->elements, $key);
        } elseif (is_string($key)) {
            $items = (array) $this->get($key);
            $value = array_merge($items, $this->getArrayItems($value));
            $this->set($key, $value);
        } elseif ($key instanceof self) {
            $this->elements = array_merge($this->elements, $key->all());
        }
    }
465878
public static function putKey($group, $key)
    {
        self::loadKeys();

        self::$keys[$group] = self::getKeys($group);

        if (!in_array($key, self::$keys[$group])) {
            self::$keys[$group][] = $key;
        }

        self::storeKeys();
    }
200863
public function remove($key) {
    $path = $this->getFileName($key, TRUE);
    if (file_exists($path)) {
      unlink($path);
    }
  }
711660
protected function configureSettings($settings, $path = '')
    {
        foreach ($settings as $key => $node) {
            if (is_array($node)) {
                $this->configureSettings($node, $path . $key . '.');
            } else {
                $this->configureSetting($path . $key, $node);
            }
        }
    }
1307707
private function recurse_through_config(array $values, $path = null)
    {
        if (empty($values)) {
            $this->has($path);
        }

        foreach ($values as $key => $value) {
            if (!\is_string($key)) {
                $this->has($path);
                continue;
            }

            if (\is_array($value)) {
                $this->recurse_through_config($value, $path ? "$path.$key" : $key);
            } else {
                $this->has("$path.$key");
            }
        }
    }
267448
public static function pathinfo_query_extend($key = null)
    {
        $pathinfo = @parse_url(SELF::request_uri());
        /*
        /----------------------------------------------------
        | $key = ['path','query']
        |----------------------------------------------------
        | pathinfo
        |----------------------------------------------------
        |
        */
        $_path = explode('/', $pathinfo['path']);
        foreach ($_path as $k => $value) {
            if (empty($value)) {
                unset($_path[$k]);
            }
        }
        $pathinfo['path'] = implode('/', $_path);

        /*
        /----------------------------------------------------
        | $key = ['path','query']
        |----------------------------------------------------
        | pathinfo
        |----------------------------------------------------
        */
        $pq = array();
        $_query = array();

        if (!empty($pathinfo['query'])) {
            $_query = explode('&', $pathinfo['query']);
        }

        //**分析ads参数
        if($_query[0]){
            if (strpos($_query[0], '=') === false) {$pathinfo['ads'] = $_query[0];}
        }

        foreach ($_query as $k => $value) {
            //存在=号
            if (strpos($value, '=') !== false) {
                $p = explode('=', $value);
                if (isset($p[0])) {
                    $p[0] = urldecode($p[0]);
                }
                if (!empty($p[0])) {
                    $pq[] = implode('=', $p);
                }
            }
        }
        $pathinfo['query'] = implode('&', $pq);
        //-返回数据
        if (empty($key)) {
            return $pathinfo;
        } else {
            return isset($pathinfo[$key]) ? $pathinfo[$key] : '';
        }
    }
70129
public static function appendPath($path)
    {
        $path = str_replace('//', '/', rtrim($path, '/'));
        if (is_dir($path) && !in_array($path, self::$_paths)) {
            array_push(self::$_paths, $path);
        }
    }
455540
protected function mergeConfigRecursivelyFrom($path, $key)
    {
        $config = $this->app['config']->get($key, []);

        $this->app['config']->set($key, array_replace_recursive(require $path, $config));
    }
162856
public function delete($key, $path = null)
    {
        $filename = $this->getKeyCode($key);
        parent::delete($filename, $path);
    }
1116481
protected function mergeDataEntry($value, $key) {
        if (!isset($this->shared[$key])) {
            $this->shared[$key] = $value;
        } elseif (isset($this->shared[$key]['#merged'])) {
            $this->shared[$key]['#value'][] = $value;
        } else {
            $oldValue = $this->shared[$key];
            $this->shared[$key] = [
                '#merged' => true,
                '#value' => [$oldValue, $value]
            ];
        }
    }
409336
public static function delete( $key ) {

		if ( isset( self::$config[ strtolower( $key ) ] ) ) {
			unset( self::$config[ strtolower( $key ) ] );
		}

	}
124970
public function flushConfig($key)
    {
        if (null !== $this->cache) {
            if (isset($this->config[$key]) && array_key_exists('cacheKey', $this->config[$key])) {
                $cacheKey = $this->config[$key]['cacheKey'];
            } else {
                $cacheKey = $this->getCacheKeyForFile($this->getFileNameForKey($key));
            }

            $this->app[$this->cache]->delete($cacheKey);
        }

        unset($this->config[$key]);
    }
595182
protected function addPath($key, $path)
    {
        // Iterate through the extensions looking for files in the path
        foreach ($this->extensions as $extension) {
          // Find all matching files for this extension
          foreach (Finder::create()->files()->name("*.{$extension}")->in($path) as $file) {
            // Skip if the file belongs to a more specific extension
            if ($this->fileMatchesMoreSpecificExtension(basename($file->getRealPath()), $extension)) {
              continue;
            }

            // Work out the files key
            $key = $this->getNestedDirectoryDots($path, $file->getPath()).basename($file->getRealPath(), ".{$extension}");

            // We already have a matching file so we need to merge the config
            if (array_key_exists($key, $this->files)) {
              $this->files[$key][] = $file->getRealPath();
              $items = $this->mergeConfigs(app('config')->get($key), require $file->getRealPath());
            }
            // Otherwise we can just require the config in
            else {
              $this->files[$key] = [$file->getRealPath()];
              $items = require $file->getRealPath();
            }

            app('config')->set($key, $items);
          }
        }

        return parent::addPath($key, $path);
    }
1294527
public function add(string $path, array $values): void
    {
        $get = (array)$this->get($path);
        $this->set($path, $this->arrayMergeRecursiveDistinct($get, $values));
    }