src/Repository.php
public function insertOne($document, $options = [])
    {
        $query = new InsertOne($this->documentManager, $this, $document, $options);
        if (isset($options['getQuery']) && $options['getQuery']) {
            return $query;
        } else {
            return $query->execute();
        }
    }
public function insertOne($document, $options = [])
    {
        $query = new InsertOne($this->documentManager, $this, $document, $options);
        if (isset($options['getQuery']) && $options['getQuery']) {
            return $query;
        } else {
            return $query->execute();
        }
    }
public function insertOne ( $ document , $ options = [ ] ) { $ query = new InsertOne ( $ this -> documentManager , $ this , $ document , $ options ) ; if ( isset ( $ options [ 'getQuery' ] ) && $ options [ 'getQuery' ] ) { return $ query ; } else { return $ query -> execute ( ) ; } }
Insert a document in collection

@param   mixed   $document   Document to insert
@param   array   $options    Options
@return  void
Insert a document in collection