public function del($key)
{
if ($key == NULL || $key == '') {
$this->ReportError('Can not delete empty key', __LINE__);
return false;
}
$auto_unlocker = NULL;
if (!$this->mutex->get_access_write($auto_unlocker)) {
return false;
}
$map = $this->mem_object->read('map');
if (is_array($key)) {
foreach ($key as $arr_key) {
$arr_key = (string) $arr_key;
unset($map[$arr_key]);
}
} else {
$key = (string) $key;
unset($map[$key]);
}
$r = $this->mem_object->save('map', $map);
if ($r === false) {
$this->ReportError('map was not saved', __LINE__);
return false;
}
return true;
}