public function destroy($notify = false) { if ($this->destroyed) { return false; } $this->destroyed = true; if ($notify) { if ($this->callback) { $func = $this->callback; $func($this); } } unset($this->conn->cursors[$this->id]); return true; }