/** * Delete a record from the database. * * @param mixed $id * @return int */ public function delete($id = null) { if ($id === null && $this->fireEvent('deleting_multiple', $this) === false) { return false; } $result = $this->query->delete($id); $this->fireEvent('deleted_multiple', $this); return $result; }