lib/Doctrine/MongoDB/Collection.php
protected function doInsert(array &$a, array $options)
    {
        $document = $a;
        $options = isset($options['safe']) ? $this->convertWriteConcern($options) : $options;
        $options = isset($options['wtimeout']) ? $this->convertWriteTimeout($options) : $options;
        $options = isset($options['timeout']) ? $this->convertSocketTimeout($options) : $options;
        $result = $this->mongoCollection->insert($document, $options);
        if (isset($document['_id'])) {
            $a['_id'] = $document['_id'];
        }
        return $result;
    }
protected function doInsert(array &$a, array $options)
    {
        $document = $a;
        $options = isset($options['safe']) ? $this->convertWriteConcern($options) : $options;
        $options = isset($options['wtimeout']) ? $this->convertWriteTimeout($options) : $options;
        $options = isset($options['timeout']) ? $this->convertSocketTimeout($options) : $options;
        $result = $this->mongoCollection->insert($document, $options);
        if (isset($document['_id'])) {
            $a['_id'] = $document['_id'];
        }
        return $result;
    }
protected function doInsert ( array & $ a , array $ options ) { $ document = $ a ; $ options = isset ( $ options [ 'safe' ] ) ? $ this -> convertWriteConcern ( $ options ) : $ options ; $ options = isset ( $ options [ 'wtimeout' ] ) ? $ this -> convertWriteTimeout ( $ options ) : $ options ; $ options = isset ( $ options [ 'timeout' ] ) ? $ this -> convertSocketTimeout ( $ options ) : $ options ; $ result = $ this -> mongoCollection -> insert ( $ document , $ options ) ; if ( isset ( $ document [ '_id' ] ) ) { $ a [ '_id' ] = $ document [ '_id' ] ; } return $ result ; }
Execute the insert query.

@see Collection::insert()
@param array $a
@param array $options
@return array|boolean
Execute the insert query .