public static function deleteDocument( $name, $id )
    {
        // Check if a document with the given name exists.
        if ( !isset( self::$documents[$name] ) )
        {
            throw new phpillowNoSuchPropertyException( $name );
        }

        $db = phpillowConnection::getInstance();
        $revision = $db->get( $db->getDatabase() . $id );

        // Only delete the current revision. This should delete all revisions
        // in the database except somebody updates the document between the get
        // and the delete request
        $db->delete( $db->getDatabase() . $id . '?rev=' . $revision->_rev );
    }
public static function deleteDocument( $name, $id )
    {
        // Check if a document with the given name exists.
        if ( !isset( self::$documents[$name] ) )
        {
            throw new phpillowNoSuchPropertyException( $name );
        }

        $db = phpillowConnection::getInstance();
        $revision = $db->get( $db->getDatabase() . $id );

        // Only delete the current revision. This should delete all revisions
        // in the database except somebody updates the document between the get
        // and the delete request
        $db->delete( $db->getDatabase() . $id . '?rev=' . $revision->_rev );
    }
public static function deleteDocument ( $ name , $ id ) { // Check if a document with the given name exists. if ( ! isset ( self :: $ documents [ $ name ] ) ) { throw new phpillowNoSuchPropertyException ( $ name ) ; } $ db = phpillowConnection :: getInstance ( ) ; $ revision = $ db -> get ( $ db -> getDatabase ( ) . $ id ) ; // Only delete the current revision. This should delete all revisions // in the database except somebody updates the document between the get // and the delete request $ db -> delete ( $ db -> getDatabase ( ) . $ id . '?rev=' . $ revision -> _rev ) ; }
Delete document by ID

Delete the document of the given type with the given ID. Throws a
phpillowNoSuchPropertyException if the document does not exist.

Deletion means, that all revisions, including the current one, are
removed.

@param string $name
@param string $id
@return void
Delete document by ID