public function store($entity)
    {
        if ($this->manager->isTraversable($entity)) {
            return $this->storeCollection($entity);
        } else {
            return $this->storeEntity($entity);
        }
    }
public function store($entity)
    {
        if ($this->manager->isTraversable($entity)) {
            return $this->storeCollection($entity);
        } else {
            return $this->storeEntity($entity);
        }
    }
public function store ( $ entity ) { if ( $ this -> manager -> isTraversable ( $ entity ) ) { return $ this -> storeCollection ( $ entity ) ; } else { return $ this -> storeEntity ( $ entity ) ; } }
Persist an entity or an entity collection into the database.

@param Mappable|\Traversable|array $entity

@throws \InvalidArgumentException
@throws MappingException

@return Mappable|\Traversable|array
Persist an entity or an entity collection into the database .