根据传入内容,决定具体请求地址;
@param string $path
@return Ambigous <string, unknown>
325749
public function resolve($path){
        // 如果不指定完整的url, 则认为是访问$urlBase内资源
        if ($this -> isUrlFormat($path)) {
            $url = $path;
        }
        // 忽略重复的路径分隔符
        else if (strpos($path, '/') === 0) {
            $url = $this -> urlBase . substr($path, 1);
        } else {
            $url = $this -> urlBase . $path;
        }
        
        return $url;
    }
558578
public function withPath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException('Uri path must be a string');
        }

        $clone = clone $this;
        $clone->path = Validator::checkPath($path);

        // if the path is absolute, then clear basePath
        if (substr($path, 0, 1) == '/') {
            $clone->basePath = '';
        }

        return $clone;
    }
193719
public static function getCanonicalURIPath($path)
    {
        //空路径设置为'/'
        if (empty($path)) {
            return '/';
        } else {
            //所有的uri必须以'/'开头
            if ($path[0] == '/') {
                return AipHttpUtil::urlEncodeExceptSlash($path);
            } else {
                return '/' . AipHttpUtil::urlEncodeExceptSlash($path);
            }
        }
    }
351071
public function resourcePath($path = '')
    {
        if ($this->resourcePath) {
            return $this->resourcePath.($path ? '/'.$path : $path);
        }

        return $this->basePath('resources'.($path ? '/'.$path : $path));
    }
109035
public function setPath(string $path)
    {
        $path = '/' . ltrim($path, '/');
        $this->query = null;
        $this->fragment = null;
        if (preg_match('/^(.*?)(\\?([^#]*))?(#(.*))?$/u', $path, $matches))
        {
            $path = $matches[1];
            $this->query = !empty($matches[3]) ? $matches[3] : null;
            $this->fragment = !empty($matches[5]) ? $matches[5] : null;
        }

        $this->path = $path;
        return $this;
    }
501780
public function setPath($path)
    {
        if(empty($path)) {
            $this->_path = '/';
        } else {
            $this->_path = $path;
        }

        return $this;
    }
335919
protected function getPath($path)
    {
        $hasHttp = strpos($path, 'http');
        if (false === $hasHttp || $hasHttp !== 0) {
            return $this->options['base_url'] . $path;
        }

        return $path;
    }
48939
public function Path($Path = NULL) {
      if (is_string($Path)) {
         $Result = $this->_ParsedRequestElement('Path', $Path);
      } else {
         $Result = $this->_ParsedRequestElement('Path');
         if ($Path === TRUE) {
            // Encode the path.
            $Parts = explode('/', $Result);
            $Parts = array_map('urlencode', $Parts);
            $Result = implode('/', $Parts);
         }
      }
      
      return $Result;
   }
1010131
public function setPath($path)
    {
        $url = parse_url($path);

        $this->path = $url['path'];
        if (isset($url['host'])) {
            $this->setHost($url['host']);
        }

        if (isset($url['query'])) {
            $this->setQuery($url['query']);
        }
        return $this;
    }
1355058
public function parsePath($path)
    {
        if ($this->getEnableCache() && isset($this->routeCache[$path])) {
            $this->routeParams->controllerName = $this->routeCache[$path][0];
            $this->routeParams->methodName     = $this->routeCache[$path][1];
            $this->controllerClassName         = $this->routeCache[$path][2];
        } else {
            if (stristr($path, '.')) {
                $this->routeParams->file = ($this->domainRoot[$this->getHost()]['root'] ?? ROOT_PATH . '/www') . $path;
                return true;
            }

            $route = explode('/', ltrim($path, '/'));
            $route = array_map(function ($name) {
                if (strpos($name, '-') !== false) { // 中横线模式处理.
                    $slices = array_map('ucfirst', explode('-', $name));
                    $name = '';
                    foreach ($slices as $slice) {
                        $name .= $slice;
                    }
                } else {
                    $name = ucfirst($name);
                }
                return $name;
            }, $route);
            if (count($route) > 1) {
                $methodName = array_pop($route);
            } else {
                $methodName = $this->defaultMethod;
            }
            $this->routeParams->controllerName = ltrim(implode("\\", $route), "\\") ?? null;
            $this->routeParams->methodName     = $methodName;
            $this->controllerClassName         = '';

            if ($this->findControllerClassName()) {
                return true;
            }

            $controllerName = empty($this->routeParams->controllerName)
                ? $this->getMethodName()
                : $this->routeParams->controllerName . "\\" . $this->getMethodName();
            $this->setControllerName($controllerName);
            $this->setMethodName($this->defaultMethod);

            if ($this->findControllerClassName(true)) {
                return true;
            }

            return false;
        }
    }
499763
public function set($path)
	{
		if (! is_string($path)) {
			throw new \InvalidArgumentException();
		}
		if ($path === '') {
			$this->setParts([]);
		} else {
			$this->setParts(explode('/', $path));
		}
		return $this;
	}
73164
private function safePath(string $path): string
    {
        while (($newPath = \str_replace('..', '', $path)) !== $path) {
            $path = $newPath;
        }

        return $path;
    }
1143983
public function resolvePath($path)
    {
        if ($path[0] == '/') {
            throw new \InvalidArgumentException('Cannot resolve absolute path.');
        }

        $segments = $this->getPathSegments();
        if (!empty($segments)) {
            // Remove the last segment for relative paths.
            array_pop($segments);
        }
        $path = trim($path, '/');
        foreach (explode('/', trim($path, '/')) as $segment) {
            if ($segment == '.') {
                continue;
            }
            elseif ($segment == '..' && !empty($segments) && end($segments) != '..') {
                array_pop($segments);
            }
            else {
                $segments[] = $segment;
            }
        }

        return implode('/', $segments);
    }
1049283
private function prepareUrl($path)
    {
        $bits = parse_url($path);

        $path = isset($bits['path']) && $bits['path'] ? $bits['path'] : '/';

        if (substr($path, 0, 1) !== '/') {
            $path = '/' . $path;
        }

        $query = isset($bits['query']) && $bits['query'] ? '?' . $bits['query'] : '';

        return $this->getUrl() . '/api/v' . $this->getApiVersion() . $path . $query;
    }
481380
private function resolvePath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(
                'Path needs to be a string'
            );
        }

        $basePath = $this->basePath();
        $path = trim($path, '/\\');

        if ($basePath && strpos($path, $basePath) === false) {
            $path = $basePath.$path;
        }

        return $path;
    }
215401
protected static function filterPath($path)
    {
        if (! is_string($path)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid path provided; must be a string argument; received %s',
                (is_object($path) ? get_class($path) : gettype($path))
            ));
        }

        if ($path && $path[0] === '/') {
            $path = '/' . ltrim($path, '/');
        }

        return preg_replace_callback(
            '/(?:[^' . self::CHAR_UNRESERVED . ':@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/u',
            function (array $matches) {
                rawurlencode($matches[0]);
            },
            $path
        );
    }
500963
public function withPath($path): UriInterface
   {
       if (!is_string($path)
        || !($parsedPath = $this->parsePath($path))) {
           throw new InvalidArgumentException(
               "Can't get with path: invalid expression");
       }
       return $this->with("path", $parsedPath);
   }