public function putMap ($request, $match)
    {
        if (isset($match['collectionId'])) {
            $collectionId = $match['collectionId'];
        } else {
            $collectionId = $request->REQUEST['collectionId'];
        }
        // $collection = Pluf_Shortcuts_GetObjectOr404('Collection_Collection',
        // $collectionId);
        if (isset($match['documentId'])) {
            $documentId = $match['documentId'];
        } else {
            $documentId = $request->REQUEST['documentId'];
        }
        $document = Pluf_Shortcuts_GetObjectOr404('Collection_Document', 
                $documentId);
        
        if ($document->collection != $collectionId) {
            throw new Pluf_Exception_DoesNotExist(
                    'Document with id (' . $documentId .
                             ') does not exist in collection with id (' .
                             $collectionId . ')');
        }
        
        $this->putDocumentMap($document, $request->REQUEST);
        return new Pluf_HTTP_Response_Json($this->getDocumentMap($document));
    }
public function putMap ($request, $match)
    {
        if (isset($match['collectionId'])) {
            $collectionId = $match['collectionId'];
        } else {
            $collectionId = $request->REQUEST['collectionId'];
        }
        // $collection = Pluf_Shortcuts_GetObjectOr404('Collection_Collection',
        // $collectionId);
        if (isset($match['documentId'])) {
            $documentId = $match['documentId'];
        } else {
            $documentId = $request->REQUEST['documentId'];
        }
        $document = Pluf_Shortcuts_GetObjectOr404('Collection_Document', 
                $documentId);
        
        if ($document->collection != $collectionId) {
            throw new Pluf_Exception_DoesNotExist(
                    'Document with id (' . $documentId .
                             ') does not exist in collection with id (' .
                             $collectionId . ')');
        }
        
        $this->putDocumentMap($document, $request->REQUEST);
        return new Pluf_HTTP_Response_Json($this->getDocumentMap($document));
    }
public function putMap ( $ request , $ match ) { if ( isset ( $ match [ 'collectionId' ] ) ) { $ collectionId = $ match [ 'collectionId' ] ; } else { $ collectionId = $ request -> REQUEST [ 'collectionId' ] ; } // $collection = Pluf_Shortcuts_GetObjectOr404('Collection_Collection', // $collectionId); if ( isset ( $ match [ 'documentId' ] ) ) { $ documentId = $ match [ 'documentId' ] ; } else { $ documentId = $ request -> REQUEST [ 'documentId' ] ; } $ document = Pluf_Shortcuts_GetObjectOr404 ( 'Collection_Document' , $ documentId ) ; if ( $ document -> collection != $ collectionId ) { throw new Pluf_Exception_DoesNotExist ( 'Document with id (' . $ documentId . ') does not exist in collection with id (' . $ collectionId . ')' ) ; } $ this -> putDocumentMap ( $ document , $ request -> REQUEST ) ; return new Pluf_HTTP_Response_Json ( $ this -> getDocumentMap ( $ document ) ) ; }
Puts attributes of a document

@param Pluf_HTTP_Request $request
@param array $match
Puts attributes of a document