根据配置名称及路径，删除配置数据

@param string $path

@return \Mellivora\Config\NativeArray
339604
public function remove($path)
    {
        list($name, $path) = $this->splitPath($path);

        if (empty($path)) {
            throw new RuntimeException('The root node of config is not writable');
        }

        return $this->load($name)->remove($path);
    }
1129978
public function registerPath($path)
    {
        $this->paths[] = Normalizer::path((string) $path, true);

        return $this;
    }
407241
public static function config($path)
    {
        $peaces = explode('.', $path);
        $name = $peaces[0];
        array_shift($peaces);

        $config = null;
        if (isset(static::$configs[$name])) {
            $config = static::$configs[$name];
        }
        if (!$config) {
            $filename = path(true, "config/{$name}.php");
            if (file_exists($filename)) {
                /** @noinspection PhpIncludeInspection */
                $config = (object)require $filename;
                static::$configs[$name] = $config;
            }
        }
        if (count($peaces) === 0) {
            return $config;
        }

        return search((array)$config, $peaces);
    }
737455
public static function fromString($path)
    {
        if (!file_exists($path)) {
            throw new InvalidArgumentType(
                '$path',
                'existing file',
                $path
            );
        }

        return new static(
            array(
                'inputUri' => $path,
                'fileName' => basename($path),
                'fileSize' => filesize($path),
            )
        );
    }
639432
private function normalizePath(array $path)
    {
        // If the path is associative (i.e. not nested), wrap it up.
        if ($this->isAssoc($path)) {
            $path = [$path];
        }

        $res = [];
        foreach ($path as $index => $pathElement) {
            if (!isset($pathElement['kind'])) {
                throw new InvalidArgumentException('Each path element must contain a kind.');
            }

            $incomplete = (!isset($pathElement['id']) && !isset($pathElement['name']));
            if ($index < count($path) -1 && $incomplete) {
                throw new InvalidArgumentException(
                    'Only the final pathElement may omit a name or ID.'
                );
            }

            if (isset($pathElement['id']) && !is_string($pathElement['id'])) {
                $pathElement['id'] = (string) $pathElement['id'];
            }

            $res[] = $pathElement;
        }

        return $res;
    }
512739
private function realPath($path)
    {
        $result = realpath($path);
        if ($result === false) {
            throw new \InvalidArgumentException(sprintf('Failed to run realpath(\'%s\')', $path));
        }

        return $result;
    }
71393
public static function canonical($path)
    {
        $path = self::split($path);
        $canon = [];
        foreach ($path as $segment) {
            if ($segment === '..') {
                array_pop($canon);
            } elseif ($segment !== '.') {
                $canon[] = $segment;
            }
        }

        if ($canon[count($canon) - 1] === '') {
            array_pop($canon);
        }

        return self::join($canon);
    }
996081
public static function normalizePath($path) {
    $parts = [];
    $path = str_replace('\\', '/', $path);
    $path = preg_replace('/\/+/', '/', $path);
    $segments = explode('/', $path);
    foreach ($segments as $segment) {
      if ($segment != '.') {
        $test = array_pop($parts);
        if (is_null($test)) {
          $parts[] = $segment;
        }
        elseif ($segment == '..') {
          if ($test == '..') {
            $parts[] = $test;
          }
          if ($test == '..' || $test == '') {
            $parts[] = $segment;
          }
        }
        else {
          $parts[] = $test;
          $parts[] = $segment;
        }
      }
    }
    return implode('/', $parts);
  }
461896
public function replace($path)
    {
        //argument 1 must be a string
        Argument::i()->test(1, 'string');

        //get the path array
        $pathArray = $this->getArray();

        //pop out the last
        array_pop($pathArray);

        //push in the new
        $pathArray[] = $path;

        //assign back to path
        $this->data = implode('/', $pathArray);

        return $this;
    }
1231676
public function mimeType($path)
    {
        if ($this->isDirectory($path) || $path == '/') {
            return LocalFilesystem::$directoryMimetype;
        }
        return $this->mimeTypes->typeOfName($path);
    }
526339
public static function canonpath($path)
    {
        $path = strtr($path, '\\', '/');

        if (preg_match('#\.\./|//|\./#', $path) === 0) {
            return $path;
        }

        $path = preg_replace('#//+#', '/', $path);

        $canonical = array();

        foreach (explode('/', $path) as $item) {
            if ($item === '..') {
                array_pop($canonical);
            } elseif ($item !== '.') {
                $canonical[] = $item;
            }
        }

        $path = implode('/', $canonical);

        $canonical = null;

        return $path;
    }
619538
function setPath($path = null)
    {
        if ($path === null)
            $path = array();

        // the associate array is useless
        $this->_pathSequence = array_values( (array) $path);
        return $this;
    }
588043
public function loadFile($path) {
        $config = null;

        try {
            $config = require $path;
        } catch (Exception $ex) {}

        if ( ! is_array($config)) {
            throw new InvalidConfigFormatException(
                s('ArrayConfigDriver expects config at path %s to be of format array[key => value].', $path)
            );
        }

        return $config;
    }
436253
protected function setPath($path)
    {
        if ($path instanceof StringList) {
            $this->path = $path;

            return $this;
        }

        if ($path === '') {
            $this->path->setPrefix('')->setSource([]);
            return $this;
        }

        $hasLeadingSlash = ($path[0] == '/');
        $hasTrailingSlash = (substr($path, -1) == '/');

        $path = is_array($path) ? $path : explode('/', trim($path, '/ '));

        $this->path->setSource($path);

        $prefix = $hasLeadingSlash || $this->scheme ? '/' : '';
        $suffix = $hasTrailingSlash ? '/' : '';

        $this->path->setPrefix($prefix);
        $this->path->setSuffix($suffix);

        return $this;
    }
1195329
protected function parsePath($path = null)
    {
        $this->dirname   = '';
        $this->basename  = '';
        $this->extension = '';
        $this->filename  = '';

        if (empty($path)) {
            return $this;
        }

        $parts = pathinfo($path);

        if (isset($parts['dirname'])) {
            $this->dirname = rtrim($parts['dirname'], '/');
        }

        if (isset($parts['basename'])) {
            $this->basename = $parts['basename'];
        }

        if (isset($parts['extension'])) {
            $this->extension = $parts['extension'];
        }

        if (isset($parts['filename'])) {
            $this->filename = $parts['filename'];
        }

        return $this;
    }
92841
public function load($path)
    {
        $path = $this->findAbsolutePath($path);

        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS)
        );
        $paths = array_map('strval', iterator_to_array($iterator));
        uasort($paths, 'strnatcasecmp');

        $features = array();

        foreach ($paths as $path) {
            $path = (string) $path;
            $loader = $this->gherkin->resolveLoader($path);

            if (null !== $loader) {
                $features = array_merge($features, $loader->load($path));
            }
        }

        return $features;
    }
404255
protected function buildSolrHierarchyFromPath($path)
    {
        $hierarchy = [];
        $path = HierarchyTool::substituteSlashes($path);

        $treeParts = GeneralUtility::trimExplode('/', $path, true);
        $currentTreeParts = [];

        foreach ($treeParts as $i => $part) {
            $currentTreeParts[] = $part;
            $hierarchyString = $i . '-' . implode('/', $currentTreeParts) . '/';
            $hierarchyString = HierarchyTool::unSubstituteSlashes($hierarchyString);
            $hierarchy[] = $hierarchyString;
        }

        return $hierarchy;
    }