public function add(array $data) {

        try {
            // add user data
            $lastInsertId = $this->visitorMapper->add($data);

            return $lastInsertId;
        }
        catch(MongoMapperException $e) {
            throw new StorageServiceException($e->getMessage());
        }
    }
public function add(array $data) {

        try {
            // add user data
            $lastInsertId = $this->visitorMapper->add($data);

            return $lastInsertId;
        }
        catch(MongoMapperException $e) {
            throw new StorageServiceException($e->getMessage());
        }
    }
public function add ( array $ data ) { try { // add user data $ lastInsertId = $ this -> visitorMapper -> add ( $ data ) ; return $ lastInsertId ; } catch ( MongoMapperException $ e ) { throw new StorageServiceException ( $ e -> getMessage ( ) ) ; } }
Add record to collection

@param array $data
@throws \Sonar\Exceptions\StorageServiceException
@return \MongoId
Add record to collection