public offsetExists ( mixed $name ) : boolean | ||
$name | mixed | The name of a value. |
return | boolean | Whether or not a value with the given name exists. |
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;
}