public static function __callStatic(string $method, array $params)
{
try {
$factory = \Jyxo\Spl\ObjectCache::get(\Jyxo\Input\Factory::class) ?: \Jyxo\Spl\ObjectCache::set(\Jyxo\Input\Factory::class, new Factory());
$value = array_shift($params);
$key = 'Jyxo\\Input\\Validator\\' . ucfirst($method) . ($params ? '/' . serialize($params) : '');
$validator = \Jyxo\Spl\ObjectCache::get($key) ?: \Jyxo\Spl\ObjectCache::set($key, $factory->getValidatorByName($method, $params));
} catch (\Exception $e) {
$validator = $factory->getValidatorByName($method, $params);
}
return $validator->isValid($value);
}