/**
 * Makes a string file-friendly
 *
 * @param string  $str
 * @return string
 */
function air2_fileify($str)
{
    $str = air2_str_clean($str);
    $str = preg_replace(array('/\\s/', '/\\.[\\.]+/', '/[^\\w_\\.\\-]/'), array('_', '.', ''), $str);
    return $str;
}
 /**
  * Get responses from row object
  *
  * @param array   $obj    row object
  * @param int     $idx    row index
  * @param array   $fields field mapping def
  * @return array data
  */
 protected function get_responses($obj, $idx, $fields)
 {
     if (!$this->tank_me_inq_id) {
         return false;
     }
     // get input, and normalize
     $type = $this->tank_me_validator->extract('type', $obj);
     $desc = $this->tank_me_validator->extract('desc', $obj);
     $desc = air2_str_clean($desc);
     $text = $this->tank_me_validator->extract('text', $obj);
     $text = air2_str_clean($text);
     return array("TankResponse_{$idx}_type" => array("TankSource" => "TankSource_{$idx}", "TankResponseSet" => "TankResponseSet_{$idx}", "sr_ques_id" => $this->tank_me_ques_ids[0], "sr_orig_value" => $type), "TankResponse_{$idx}_desc" => array("TankSource" => "TankSource_{$idx}", "TankResponseSet" => "TankResponseSet_{$idx}", "sr_ques_id" => $this->tank_me_ques_ids[1], "sr_orig_value" => $desc), "TankResponse_{$idx}_text" => array("TankSource" => "TankSource_{$idx}", "TankResponseSet" => "TankResponseSet_{$idx}", "sr_ques_id" => $this->tank_me_ques_ids[2], "sr_orig_value" => $text));
 }