/** * Write the given row as comma separated values in the next line * * @param RowInterface $row * @return int */ public function writeRow(RowInterface $row) { return $this->writeLine($row->toArray()); }
/** * Helper to search based on the given array * * @param RowInterface $row * @param array $searchParams * @return bool */ private function hasMatchOnSpecificColumns($row, $searchParams) { foreach ($searchParams as $name => $value) { if (is_array($value)) { foreach ($value as $v) { if (strpos($row->getColumn($name)->getValue(), $v) !== false) { return true; } } } if (!is_array($value)) { if (strpos($row->getColumn($name)->getValue(), $value) !== false) { return true; } } } return false; }