public function makeContextUrl( Context $context, $path = '', array $query = [] ): string
	{
		if( $context->isHost() )
		{
			$url  = $context->isSsl() ? "https://" : "http://";
			$url .= $context->getHost();
			$port = $context->getPort();
			if( $port > 0 && $port !== 80 )
			{
				$url .= ":" . $port;
			}
			$url .= $this->isBasePrefix() ? $this->base_prefix : "/";
		}
		else
		{
			$url = $this->getPrefix();
		}

		if( $context->isQuery() )
		{
			foreach($context->getQuery() as $name => $value)
			{
				if( is_array($value) )
				{
					if( ! isset($query[$name]) || ! in_array($query[$name], $value) )
					{
						$query[$name] = current($value);
					}
				}
				else
				{
					$query[$name] = $value;
				}
			}
		}

		if( is_array($path) )
		{
			$path = implode("/", $path);
		}
		else if( strlen($path) && $path[0] === "/" )
		{
			$path = substr($path, 1);
		}

		if( $context->isPath() )
		{
			$path = trim($context->getPath(), "/") . "/" . $path;
		}

		return $this->getModeUrl($url, $path, $query);
	}