Exemplo n.º 1
0
 private function handleHeadCsv($row)
 {
     $headrow = array();
     foreach (array('shortname', 'fullname', 'text') as $needle) {
         $col = ArrayOperation::multiSearch($this->alias[$needle], $row);
         if (false === $col) {
             throw new \Exception("Undetermined position of {$needle}");
         }
         $headrow[$needle] = $col;
     }
     foreach (array('parent_shortname', 'report_shortname', 'url', 'notes', 'source', 'risk') as $optNeedle) {
         $headrow[$optNeedle] = ArrayOperation::multiSearch($this->alias[$optNeedle], $row);
     }
     return $headrow;
 }