Remove specified keys.
string|array $key:
integer
public function delete($key) {
if (!$this->connected) {
return false;
}
if (is_array($key)) {
$result = 0;
foreach ($key as $k) {
if (isset($this->storage[$k])) {
unset($this->storage[$k]);
++$result;
}
}
return $result;
}
if (isset($this->storage[$key])) {
unset($this->storage[$key]);
return 1;
}
return 0;
}