function erase($key, $val) { $found = $this->find($key, $val); if ($found && ($id = $found[0]->id)) { unset($_SESSION[$this->key][$id]); if ($id == $this->id) { $this->reset(); } return TRUE; } return FALSE; }