original_string: protected function _processAnswer($key, $input, $type)
      {
          $output    = array();
          $modelName = str_replace('/', '_', $key);
  
          if (array_key_exists($key, $input))
          {
              $value = $input[$key];
          } else {
              return $output;
          }
  
          switch ($type) {
              case 'dateTime':
                  // A null value will sometimes be empty, causing errors in \Zend_Date
                  if (empty($value)) {$value = null;}
                  $output[$modelName] = new \Zend_Date($value, \Zend_Date::ISO_8601);
                  break;
  
              case 'select':
                  $items = explode(' ', $value);
                  foreach ($items as $idx => $answer) {
                      $multiName = $modelName . '_' . $answer;
                      $output[$multiName] = 1;
                  }
                  break;
  
              case 'geopoint':
                  // Location split in 4 fields  latitude, longitude, altitude and accuracy.
                  $items         = explode(' ', $value);
                  if (count($items) == 4) {
                      $output[$modelName . '_lat']  = $items[0];
                      $output[$modelName . '_long'] = $items[1];
                      $output[$modelName . '_alt']  = $items[2];
                      $output[$modelName . '_acc']  = $items[3];
                  }
                  break;
  
              default:
                  $output[$modelName] = $value;
                  break;
          }
  
          return $output;
      }
code: protected function _processAnswer($key, $input, $type)
      {
          $output    = array();
          $modelName = str_replace('/', '_', $key);
  
          if (array_key_exists($key, $input))
          {
              $value = $input[$key];
          } else {
              return $output;
          }
  
          switch ($type) {
              case 'dateTime':
                  // A null value will sometimes be empty, causing errors in \Zend_Date
                  if (empty($value)) {$value = null;}
                  $output[$modelName] = new \Zend_Date($value, \Zend_Date::ISO_8601);
                  break;
  
              case 'select':
                  $items = explode(' ', $value);
                  foreach ($items as $idx => $answer) {
                      $multiName = $modelName . '_' . $answer;
                      $output[$multiName] = 1;
                  }
                  break;
  
              case 'geopoint':
                  // Location split in 4 fields  latitude, longitude, altitude and accuracy.
                  $items         = explode(' ', $value);
                  if (count($items) == 4) {
                      $output[$modelName . '_lat']  = $items[0];
                      $output[$modelName . '_long'] = $items[1];
                      $output[$modelName . '_alt']  = $items[2];
                      $output[$modelName . '_acc']  = $items[3];
                  }
                  break;
  
              default:
                  $output[$modelName] = $value;
                  break;
          }
  
          return $output;
      }
code_tokens: protected function _processAnswer ( $ key , $ input , $ type ) { $ output = array ( ) ; $ modelName = str_replace ( '/' , '_' , $ key ) ; if ( array_key_exists ( $ key , $ input ) ) { $ value = $ input [ $ key ] ; } else { return $ output ; } switch ( $ type ) { case 'dateTime' : // A null value will sometimes be empty, causing errors in \Zend_Date if ( empty ( $ value ) ) { $ value = null ; } $ output [ $ modelName ] = new \ Zend_Date ( $ value , \ Zend_Date :: ISO_8601 ) ; break ; case 'select' : $ items = explode ( ' ' , $ value ) ; foreach ( $ items as $ idx => $ answer ) { $ multiName = $ modelName . '_' . $ answer ; $ output [ $ multiName ] = 1 ; } break ; case 'geopoint' : // Location split in 4 fields  latitude, longitude, altitude and accuracy. $ items = explode ( ' ' , $ value ) ; if ( count ( $ items ) == 4 ) { $ output [ $ modelName . '_lat' ] = $ items [ 0 ] ; $ output [ $ modelName . '_long' ] = $ items [ 1 ] ; $ output [ $ modelName . '_alt' ] = $ items [ 2 ] ; $ output [ $ modelName . '_acc' ] = $ items [ 3 ] ; } break ; default : $ output [ $ modelName ] = $ value ; break ; } return $ output ; }
docstring: If needed process the answer
  
  @param string $key
  @param mixed $value
  @param string $type
  @return array
docstring_tokens: If needed process the answer