Box\Spout\Writer\AbstractWriter::addRowWithStyle PHP Method

addRowWithStyle() public method

Write given data to the output and apply the given style.
See also: addRow
public addRowWithStyle ( array $dataRow, Style $style ) : AbstractWriter
$dataRow array Array of array containing data to be streamed.
$style Box\Spout\Writer\Style\Style Style to be applied to the row.
return AbstractWriter
    public function addRowWithStyle(array $dataRow, $style)
    {
        if (!$style instanceof Style\Style) {
            throw new InvalidArgumentException('The "$style" argument must be a Style instance and cannot be NULL.');
        }
        $this->setRowStyle($style);
        $this->addRow($dataRow);
        $this->resetRowStyleToDefault();
        return $this;
    }