src/AbstractEntityService.php
public function persist($entity)
    {
        if (!$this->isRepositoryWritable()) {
            throw $this->createNotWritableException();
        }

        return $this->trigger(__FUNCTION__, [
            'entity' => $entity,
        ]);
    }
public function persist($entity)
    {
        if (!$this->isRepositoryWritable()) {
            throw $this->createNotWritableException();
        }

        return $this->trigger(__FUNCTION__, [
            'entity' => $entity,
        ]);
    }
public function persist ( $ entity ) { if ( ! $ this -> isRepositoryWritable ( ) ) { throw $ this -> createNotWritableException ( ) ; } return $ this -> trigger ( __FUNCTION__ , [ 'entity' => $ entity , ] ) ; }
Persist the given entity

@param object $entity
@return mixed
@throws \Zend\EventManager\Exception\InvalidArgumentException
@throws RuntimeException
Persist the given entity