original_string: public function exportMetadata($format = 'php', $fields = [], $forms = [])
      {
          $data = array(
                  'token' => $this->apiToken,
                  'content' => 'metadata',
                  'returnFormat' => 'json'
          );
          
          #---------------------------------------
          # Process format
          #---------------------------------------
          $legalFormats = array('csv', 'json', 'php', 'xml');
          $data['format'] = $this->processFormatArgument($format, $legalFormats);
          $data['forms']  = $this->processFormsArgument($forms);
          $data['fields'] = $this->processFieldsArgument($fields);
          
          #-------------------------------------------
          # Get and process metadata
          #-------------------------------------------
          $metadata = $this->connection->callWithArray($data);
          $metadata = $this->processExportResult($metadata, $format);
          
          return $metadata;
      }
code: public function exportMetadata($format = 'php', $fields = [], $forms = [])
      {
          $data = array(
                  'token' => $this->apiToken,
                  'content' => 'metadata',
                  'returnFormat' => 'json'
          );
          
          #---------------------------------------
          # Process format
          #---------------------------------------
          $legalFormats = array('csv', 'json', 'php', 'xml');
          $data['format'] = $this->processFormatArgument($format, $legalFormats);
          $data['forms']  = $this->processFormsArgument($forms);
          $data['fields'] = $this->processFieldsArgument($fields);
          
          #-------------------------------------------
          # Get and process metadata
          #-------------------------------------------
          $metadata = $this->connection->callWithArray($data);
          $metadata = $this->processExportResult($metadata, $format);
          
          return $metadata;
      }
code_tokens: public function exportMetadata ( $ format = 'php' , $ fields = [ ] , $ forms = [ ] ) { $ data = array ( 'token' => $ this -> apiToken , 'content' => 'metadata' , 'returnFormat' => 'json' ) ; #--------------------------------------- # Process format #--------------------------------------- $ legalFormats = array ( 'csv' , 'json' , 'php' , 'xml' ) ; $ data [ 'format' ] = $ this -> processFormatArgument ( $ format , $ legalFormats ) ; $ data [ 'forms' ] = $ this -> processFormsArgument ( $ forms ) ; $ data [ 'fields' ] = $ this -> processFieldsArgument ( $ fields ) ; #------------------------------------------- # Get and process metadata #------------------------------------------- $ metadata = $ this -> connection -> callWithArray ( $ data ) ; $ metadata = $ this -> processExportResult ( $ metadata , $ format ) ; return $ metadata ; }
docstring: Exports metadata about the project, i.e., information about the fields in the project.
  
  @param string $format the format for the export.
  <ul>
  <li> 'php' - [default] array of maps of values</li>
  <li> 'csv' - string of CSV (comma-separated values)</li>
  <li> 'json' - string of JSON encoded values</li>
  <li> 'xml' - string of XML encoded data</li>
  </ul>
  @param array $fields array of field names for which metadata should be exported
  @param array $forms array of form names. Metadata will be exported for all fields in the
  specified forms.
  
  @return array associative array (map) of metatdata for the project, which consists of
  information about each field. Some examples of the information
  provided are: 'field_name', 'form_name', 'field_type', 'field_label'.
  See REDCap API documentation
  for more information, or use the print_r function on the results of this method.
docstring_tokens: Exports metadata about the project i . e . information about the fields in the project .