src/Synapse/Mapper/AbstractMapper.php
public function persist(AbstractEntity $entity)
    {
        /** @var InserterTrait $this */
        if ($entity->isNew()) {
            return $this->insert($entity);
        }

        /** @var UpdaterTrait $this */
        return $this->update($entity);
    }
public function persist(AbstractEntity $entity)
    {
        /** @var InserterTrait $this */
        if ($entity->isNew()) {
            return $this->insert($entity);
        }

        /** @var UpdaterTrait $this */
        return $this->update($entity);
    }
public function persist ( AbstractEntity $ entity ) { /** @var InserterTrait $this */ if ( $ entity -> isNew ( ) ) { return $ this -> insert ( $ entity ) ; } /** @var UpdaterTrait $this */ return $ this -> update ( $ entity ) ; }
Persist this entity, inserting it if new and otherwise updating it

@param  AbstractEntity $entity
@return AbstractEntity
Persist this entity inserting it if new and otherwise updating it