ÿØÿÛ C
name file | size | edit | permission | action |
---|---|---|---|---|
.editorconfig | 258 KB | August 13 2024 21:03:02 | 0770 | |
.env | 1340 KB | November 09 2024 13:13:00 | 0770 | |
.env.example | 1213 KB | August 13 2024 21:03:02 | 0770 | |
.gitattributes | 186 KB | August 13 2024 21:03:02 | 0770 | |
.htaccess | 466 KB | August 13 2024 21:03:02 | 0770 | |
.well-known | - | July 10 2025 23:46:46 | 0750 | |
11.php | 70548 KB | July 01 2025 20:07:37 | 0644 | |
Modules | - | November 04 2024 11:42:06 | 0755 | |
README.md | 80 KB | August 13 2024 21:03:02 | 0770 | |
admin-link.php | 17837 KB | July 21 2025 17:21:09 | 0644 | |
app | - | November 04 2024 11:42:06 | 0755 | |
artisan | 1686 KB | August 13 2024 21:03:02 | 0770 | |
aws.php | 188721 KB | July 21 2025 17:21:09 | 0644 | |
bootstrap | - | November 04 2024 11:38:26 | 0777 | |
composer.json | 2932 KB | September 19 2024 12:33:02 | 0770 | |
composer.lock | 415525 KB | September 19 2024 12:33:02 | 0770 | |
config | - | July 02 2025 03:17:17 | 0777 | |
database | - | November 04 2024 11:42:06 | 0777 | |
index.php | 13824 KB | July 02 2025 01:57:55 | 0770 | |
ktq.txt | 1 KB | July 02 2025 01:58:01 | 0644 | |
lang | - | November 04 2024 11:38:26 | 0777 | |
main.php | 302 KB | July 05 2025 04:22:24 | 0644 | |
modules_statuses.json | 775 KB | August 26 2024 12:34:26 | 0770 | |
package-lock.json | 72682 KB | November 09 2024 12:47:51 | 0770 | |
package.json | 481 KB | August 13 2024 21:03:02 | 0770 | |
phpunit.xml | 1084 KB | August 13 2024 21:03:02 | 0770 | |
postcss.config.js | 93 KB | August 13 2024 21:03:02 | 0770 | |
public | - | July 12 2025 06:01:05 | 0777 | |
resources | - | November 04 2024 11:42:07 | 0755 | |
robots.txt | 986 KB | July 23 2025 23:26:32 | 0644 | |
routes | - | November 04 2024 11:38:26 | 0777 | |
server.php | 541 KB | August 13 2024 21:03:04 | 0770 | |
ss.php | 17569 KB | July 02 2025 03:06:06 | 0644 | |
storage | - | November 04 2024 11:42:08 | 0755 | |
tailwind.config.js | 541 KB | August 13 2024 21:03:04 | 0770 | |
tests | - | November 04 2024 11:42:08 | 0777 | |
tmp.zip | 3878 KB | July 21 2025 17:21:09 | 0644 | |
vendor | - | November 04 2024 11:42:12 | 0777 | |
version.json | 26 KB | October 15 2024 18:29:32 | 0770 | |
vite-module-loader.js | 1397 KB | August 13 2024 21:03:06 | 0770 | |
vite.config.js | 310 KB | August 13 2024 21:03:06 | 0770 |
* * @final */ class Caster { public const EXCLUDE_VERBOSE = 1; public const EXCLUDE_VIRTUAL = 2; public const EXCLUDE_DYNAMIC = 4; public const EXCLUDE_PUBLIC = 8; public const EXCLUDE_PROTECTED = 16; public const EXCLUDE_PRIVATE = 32; public const EXCLUDE_NULL = 64; public const EXCLUDE_EMPTY = 128; public const EXCLUDE_NOT_IMPORTANT = 256; public const EXCLUDE_STRICT = 512; public const EXCLUDE_UNINITIALIZED = 1024; public const PREFIX_VIRTUAL = "\0~\0"; public const PREFIX_DYNAMIC = "\0+\0"; public const PREFIX_PROTECTED = "\0*\0"; // usage: sprintf(Caster::PATTERN_PRIVATE, $class, $property) public const PATTERN_PRIVATE = "\0%s\0%s"; private static array $classProperties = []; /** * Casts objects to arrays and adds the dynamic property prefix. * * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not */ public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, ?string $debugClass = null): array { if ($hasDebugInfo) { try { $debugInfo = $obj->__debugInfo(); } catch (\Throwable) { // ignore failing __debugInfo() $hasDebugInfo = false; } } $a = $obj instanceof \Closure ? [] : (array) $obj; if ($obj instanceof \__PHP_Incomplete_Class) { return $a; } $classProperties = self::$classProperties[$class] ??= self::getClassProperties(new \ReflectionClass($class)); $a = array_replace($classProperties, $a); if ($a) { $debugClass ??= get_debug_type($obj); $i = 0; $prefixedKeys = []; foreach ($a as $k => $v) { if ("\0" !== ($k[0] ?? '')) { if (!isset($classProperties[$k])) { $prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k; } } elseif ($debugClass !== $class && 1 === strpos($k, $class)) { $prefixedKeys[$i] = "\0".$debugClass.strrchr($k, "\0"); } ++$i; } if ($prefixedKeys) { $keys = array_keys($a); foreach ($prefixedKeys as $i => $k) { $keys[$i] = $k; } $a = array_combine($keys, $a); } } if ($hasDebugInfo && \is_array($debugInfo)) { foreach ($debugInfo as $k => $v) { if (!isset($k[0]) || "\0" !== $k[0]) { if (\array_key_exists(self::PREFIX_DYNAMIC.$k, $a)) { continue; } $k = self::PREFIX_VIRTUAL.$k; } unset($a[$k]); $a[$k] = $v; } } return $a; } /** * Filters out the specified properties. * * By default, a single match in the $filter bit field filters properties out, following an "or" logic. * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. * * @param array $a The array containing the properties to filter * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set * @param int|null &$count Set to the number of removed properties */ public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array { $count = 0; foreach ($a as $k => $v) { $type = self::EXCLUDE_STRICT & $filter; if (null === $v) { $type |= self::EXCLUDE_NULL & $filter; $type |= self::EXCLUDE_EMPTY & $filter; } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { $type |= self::EXCLUDE_EMPTY & $filter; } elseif ($v instanceof UninitializedStub) { $type |= self::EXCLUDE_UNINITIALIZED & $filter; } if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { $type |= self::EXCLUDE_NOT_IMPORTANT; } if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { $type |= self::EXCLUDE_VERBOSE; } if (!isset($k[1]) || "\0" !== $k[0]) { $type |= self::EXCLUDE_PUBLIC & $filter; } elseif ('~' === $k[1]) { $type |= self::EXCLUDE_VIRTUAL & $filter; } elseif ('+' === $k[1]) { $type |= self::EXCLUDE_DYNAMIC & $filter; } elseif ('*' === $k[1]) { $type |= self::EXCLUDE_PROTECTED & $filter; } else { $type |= self::EXCLUDE_PRIVATE & $filter; } if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { unset($a[$k]); ++$count; } } return $a; } public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, bool $isNested): array { if (isset($a['__PHP_Incomplete_Class_Name'])) { $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; unset($a['__PHP_Incomplete_Class_Name']); } return $a; } private static function getClassProperties(\ReflectionClass $class): array { $classProperties = []; $className = $class->name; if ($parent = $class->getParentClass()) { $classProperties += self::$classProperties[$parent->name] ??= self::getClassProperties($parent); } foreach ($class->getProperties() as $p) { if ($p->isStatic()) { continue; } $classProperties[match (true) { $p->isPublic() => $p->name, $p->isProtected() => self::PREFIX_PROTECTED.$p->name, default => "\0".$className."\0".$p->name, }] = new UninitializedStub($p); } return $classProperties; } }