/** * Saves an entity. * * @param \Cactus\Entity $entity The entity to save * @return mixed create = array($id, $affected) | update = $affected */ public function save(\Cactus\Entity &$entity) { return $entity->isNew() ? $this->create($entity) : $this->update($entity); }