original_string: public function importInstrumentEventMappings($mappings, $format = 'php')
      {
          $data = array(
              'token'        => $this->apiToken,
              'content'      => 'formEventMapping',
              'returnFormat' => 'json'
          );
          
          #---------------------------------------
          # Process arguments
          #---------------------------------------
          $data['data'] = $this->processImportDataArgument($mappings, 'mappings', $format);
          $legalFormats = array('csv', 'json', 'php', 'xml');
          $data['format'] = $this->processFormatArgument($format, $legalFormats);
          
          $result = $this->connection->callWithArray($data);
          
          $this->processNonExportResult($result);
          
          return (integer) $result;
      }
code: public function importInstrumentEventMappings($mappings, $format = 'php')
      {
          $data = array(
              'token'        => $this->apiToken,
              'content'      => 'formEventMapping',
              'returnFormat' => 'json'
          );
          
          #---------------------------------------
          # Process arguments
          #---------------------------------------
          $data['data'] = $this->processImportDataArgument($mappings, 'mappings', $format);
          $legalFormats = array('csv', 'json', 'php', 'xml');
          $data['format'] = $this->processFormatArgument($format, $legalFormats);
          
          $result = $this->connection->callWithArray($data);
          
          $this->processNonExportResult($result);
          
          return (integer) $result;
      }
code_tokens: public function importInstrumentEventMappings ( $ mappings , $ format = 'php' ) { $ data = array ( 'token' => $ this -> apiToken , 'content' => 'formEventMapping' , 'returnFormat' => 'json' ) ; #--------------------------------------- # Process arguments #--------------------------------------- $ data [ 'data' ] = $ this -> processImportDataArgument ( $ mappings , 'mappings' , $ format ) ; $ legalFormats = array ( 'csv' , 'json' , 'php' , 'xml' ) ; $ data [ 'format' ] = $ this -> processFormatArgument ( $ format , $ legalFormats ) ; $ result = $ this -> connection -> callWithArray ( $ data ) ; $ this -> processNonExportResult ( $ result ) ; return ( integer ) $ result ; }
docstring: Imports the specified instrument-event mappings into the project.
  
  @param mixed $mappings the mappings to import. This will
  be a PHP array of associative arrays if no format, or
  'php' format, was specified,
  and a string otherwise. In all cases, the field names that
  are used in the mappings are:
  arm_num, unique_event_name, form
  @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>
  
  @throws PhpCapException if an error occurs.
  
  @return integer the number of mappings imported.
docstring_tokens: Imports the specified instrument - event mappings into the project .