public function exportFile($recordId, $field, $event = null, $repeatInstance = null)
    {
        $data = array(
                'token'        => $this->apiToken,
                'content'      => 'file',
                'action'       => 'export',
                'returnFormat' => 'json'
        );
        
        #--------------------------------------------
        # Process arguments
        #--------------------------------------------
        $data['record']           = $this->processRecordIdArgument($recordId);
        $data['field']            = $this->processFieldArgument($field);
        $data['event']            = $this->processEventArgument($event);
        $data['repeat_instance']  = $this->processRepeatInstanceArgument($repeatInstance);
        
        #-------------------------------
        # Get and process file
        #-------------------------------
        $file = $this->connection->callWithArray($data);
        $file = $this->processExportResult($file, $format = 'file');
        
        return $file;
    }
public function exportFile($recordId, $field, $event = null, $repeatInstance = null)
    {
        $data = array(
                'token'        => $this->apiToken,
                'content'      => 'file',
                'action'       => 'export',
                'returnFormat' => 'json'
        );
        
        #--------------------------------------------
        # Process arguments
        #--------------------------------------------
        $data['record']           = $this->processRecordIdArgument($recordId);
        $data['field']            = $this->processFieldArgument($field);
        $data['event']            = $this->processEventArgument($event);
        $data['repeat_instance']  = $this->processRepeatInstanceArgument($repeatInstance);
        
        #-------------------------------
        # Get and process file
        #-------------------------------
        $file = $this->connection->callWithArray($data);
        $file = $this->processExportResult($file, $format = 'file');
        
        return $file;
    }
public function exportFile ( $ recordId , $ field , $ event = null , $ repeatInstance = null ) { $ data = array ( 'token' => $ this -> apiToken , 'content' => 'file' , 'action' => 'export' , 'returnFormat' => 'json' ) ; #-------------------------------------------- # Process arguments #-------------------------------------------- $ data [ 'record' ] = $ this -> processRecordIdArgument ( $ recordId ) ; $ data [ 'field' ] = $ this -> processFieldArgument ( $ field ) ; $ data [ 'event' ] = $ this -> processEventArgument ( $ event ) ; $ data [ 'repeat_instance' ] = $ this -> processRepeatInstanceArgument ( $ repeatInstance ) ; #------------------------------- # Get and process file #------------------------------- $ file = $ this -> connection -> callWithArray ( $ data ) ; $ file = $ this -> processExportResult ( $ file , $ format = 'file' ) ; return $ file ; }
Exports the specified file.

@param string $recordId the record ID for the file to be exported.
@param string $field the name of the field containing the file to export.
@param string $event name of event for file export (for longitudinal studies).
@param integer $repeatInstance

@throws PhpCapException if an error occurs.

@return string the contents of the file that was exported.
Exports the specified file .