public function delete()
{
$this->events()->trigger(__CLASS__, 'before.delete', $this);
$id = $this->getId();
if (!empty($id)) {
parent::delete(array('id' => $id));
$this->events()->trigger(__CLASS__, 'after.delete', $this);
unset($this);
return true;
}
$this->events()->trigger(__CLASS__, 'after.delete.failed', $this);
return false;
}