private static function redirect(string $url, bool $forceRelative, int $statusCode): void
  {
    if ($forceRelative && !Url::isRelative($url))
    {
      $url = '/';
    }

    self::clearOutput();

    self::$status = $statusCode;
    header('HTTP/1.1 '.$statusCode.' '.self::$httpStatuses[$statusCode]);
    header('location: '.$url);
  }