public function offsetExists($name) { if (array_key_exists($name, $this->cache)) { return true; } foreach ($this->types as $type) { $value = filter_input($type, $name, FILTER_DEFAULT, ['default' => null]); if (null !== $value) { $this->cache[$name] = $value; return true; } } return false; }