Set url (don't use this)

@param mixed $path
@return void
13098
public static function url(string $path, $uri)
  {
    $path = substr($path, 0, 1) != '/' ? '/' . $path : $path;

    $root = isset($_SERVER["SCRIPT_NAME"]) ? $_SERVER['SCRIPT_NAME'] : '';
    $dir = pathinfo($root)['dirname'];

    if (isset($_SERVER['HTTP_HOST'])) {
      if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
        $http = 'https://';
      } else {
        $http = 'http://';
      }

      $url = $http . $_SERVER['HTTP_HOST'] . ($dir == '/' ? '' : $dir) . $path;
    } else {
      $url = ($uri ? config('app.url') : '') . $path;
    }

    if (isset($_SERVER['QUERY_STRING'])) {
      if (str_contains($url, '?')) $url .= '&' . $_SERVER['QUERY_STRING'];
      if (!str_contains($url, '?')) $url .= '?' . $_SERVER['QUERY_STRING'];
    }

    return $url;
  }
173199
public function setPath($path)
    {
        if ($this->path) {
            $this->old_paths[] = $this->path;
        }
        $this->path = $path;

        return $this;
    }
1202991
public function setPath( $path )
	{
#		if( $path && !file_exists( $path ) )
#			throw new RuntimeException( 'Invalid path' );
		$path	= str_replace( DIRECTORY_SEPARATOR, "/", $path );
		$path	= preg_replace( "@(.+)/$@", "\\1", $path )."/";
		$this->path	= $path;
	}
227390
public function setPath(string $path)
    {
        $info = pathinfo($path);

        $this->setLocation($info["dirname"] ?? "");
        $this->setName($info["filename"] ?? "");
    }
672118
protected function setPath(/*# string */ $uriPath)
    {
        $pos = strpos($uriPath, '?');
        if (false !== $pos) {
            $path = substr($uriPath, 0, $pos);
            parse_str(substr($uriPath, $pos + 1), $this->parameters);
        } else {
            $path = $uriPath;
        }

        // remove trailing '/'
        $this->path = rtrim($path, '/');
    }
1087334
public function setPath($path)
    {
        if (is_array($path)) {
            $this->path = '/' . implode('/', $path);
        } else {
            $this->path = (string) $path;
        }

        return $this;
    }
1182138
public static function addPath($path)
    {
        $path = str_replace('//', '/', rtrim($path, '/'));
        if (is_dir($path) && !in_array($path, self::$_paths)) {
            array_unshift(self::$_paths, $path);
        }
    }
1200729
public function setPath($path)
    {
        static $search  = [' ',   '?'];
        static $replace = ['%20', '%3F'];
        $this->path = str_replace($search, $replace, $path);

        return $this;
    }
1284790
public function setPath($path = "")
    {
        if ($path != "") {
            $this->_path = str_replace("\\", DS, $path);
            $this->_path = (substr($this->_path, -1) == DS) ? substr($this->_path, 0, -1) : $this->_path;
        }
    }
857212
public function setRuntimePath($path)
    {
        $this->_runtimePath = Zilf::getAlias($path);
        Zilf::setAlias('@runtime', $this->_runtimePath);
    }
390482
public function resetPath(string $path)
    {
        foreach ($this->cache as &$cache) {
            unset($cache[$path], $cache);
        }
    }
1091302
public function setPath( $path )
    {
        // Validate $path, it cant be null and must exist
        if ( ! is_string( $path ) ){ throw new InvalidPathException( 'Path must be of type string' ); }
        if ( is_null( $path ) ){ throw new InvalidPathException( 'Path can not be null' ); }
        if ( ! file_exists( $path )){ throw new InvalidPathException( '('. $path .') is invalid' ); }

        $this->path = $path;
    }
1215023
public function setPath(string $path = ''): void
    {
        $this->path = '/';
        if ($path != '') {
            $this->path .= \substr($path, 0, 1) === '/' ? \substr($path, 1) : $path;
        }
    }
859950
public function setPath(string $path): self
    {
        parent::setPath($path);
        $this->directory = new Directory(\dirname($path));

        return $this;
    }
1136900
protected function redirect($path)
	{
		$path = str_replace('//', '/', $this->app->baseURL . $path);

		$this->app->redirect($path);
	}
924924
private function setUrl() {

		$this -> url = Router :: url($this -> identifier, $this -> params, $this -> domain);

		$url = new URLParser($this -> url);

		if(null === $url -> getScheme() && strlen($this -> url) > 0) {
			$this -> url = '/' . $this -> url;
		}
	}
1245214
protected function setUrl($url)
    {
        $this->url = $url instanceof Url ? $url : new Url($url);

        parse_str($this->url->query(), $this->query);
    }