\n" . "\n" . "405 Method Not Allowed\n" . "\n" . "

Method Not Allowed

\n" . "

The requested method " . $_SERVER['REQUEST_METHOD'] . " is not allowed for this resource.

\n" . self::serverSignature()); } } protected static function page404(): string { header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404); die("\n" . "\n" . "404 Not Found\n" . "\n" . "

Not Found

\n" . "

The requested URL was not found on this server.

\n" . self::serverSignature()); } public static function redirect(string $location) { header($_SERVER['SERVER_PROTOCOL'] . ' 302 Found', true, 302); header('Location: ' . $location, true); die("\n" . "\n" . "302 Found\n" . "\n" . "

Found

\n" . "

The document has moved here.

\n" . self::serverSignature()); } private static function serverSignature(): string { return "
\n" . "
" . $_SERVER['SERVER_SOFTWARE'] . " Server at " . $_SERVER['SERVER_NAME'] . " Port " . $_SERVER['SERVER_PORT'] . "
\n" . "\n"; } protected static function setCharset(string $charset): void { self::$charset = $charset; } protected static function setContentType(string $contentType): void { self::$contentType = $contentType; } protected static function setResponseCode(string $responseCode): void { self::$responseCode = $responseCode; } }