Adds a row to the table.

@param string[] $row An array of data cells.

@return static The current instance.

@throws LogicException If the row contains more or less columns than
rows previously added to the table.
487426
public function addRow(array $row)
    {
        if (null === $this->nbColumns) {
            $this->nbColumns = count($row);
        } elseif (count($row) !== $this->nbColumns) {
            throw new LogicException(sprintf(
                'Expected the row to contain %s cells, but got %s.',
                $this->nbColumns,
                count($row)
            ));
        }

        $this->rows[] = array_values($row);

        return $this;
    }
730338
protected function addToCSV(array $row = [])
    {
        $rowReducedByControlFields = self::removeControlFieldsFromFieldRow($row);
        // Get an field array without control fields but in the expected order
        $fieldArray = array_intersect_key(array_flip($this->fieldArray), $rowReducedByControlFields);
        // Overwrite fieldArray to keep the order with an array of needed fields
        $rowReducedToSelectedColumns = array_replace(
            $fieldArray,
            array_intersect_key($rowReducedByControlFields, $fieldArray)
        );
        $this->setCsvRow($rowReducedToSelectedColumns);
    }
362533
public function addRow(GridRow $row)
    {
        if (!$this->rows->contains($row)) {
            $this->rows->add($row);
            $row->setQuestion($this);
        }
    }
177011
public function setRows(array $rows)
    {
        if (isset($rows['_head'])) {
            $this->setHeading($rows['_head']);
            unset($rows['_head']);
        }
        
        if (!empty($rows)) {
            foreach($rows as $row) {
                $this->setRow($row);
            }
        }
        
        return $this;
    }
636012
public function addSummaryRow(Row $row)
    {
        $this->summaryRow = $row;

        // add summary row to index
        if (!$this->indexNotUpToDate
            && $this->rebuildIndexContinuously
        ) {
            $label = $row->getColumn('label');
            if ($label !== false) {
                $this->rowsIndexByLabel[$label] = self::ID_SUMMARY_ROW;
            }
        }

        return $row;
    }
1191653
protected function _createInstanceFromRow($row)
        {
            $instance = self::for_table($this->_table_name, $this->_connection_name);
            $instance->use_id_column($this->_instance_id_column);
            $instance->hydrate($row);

            return $instance;
        }
350866
public function addRow(array $row, Style $style)
    {
        $columnCount = count($row);
        $this->updateMaxColumnCount($columnCount);
        $cellXml = $this->getCellXml($row, $style);

        return $this->getRowXml($columnCount, $cellXml);
    }
20563
public function addRow($values=array()) {
		$row=$this->getBody()->addRow($this->_colCount);
		$row->setValues(\array_values($values));
		return $this;
	}
590200
public static function addRowToMap($row)
    {
        $id = static::getIdAttribute();
        if ($row !== null && isset($row[$id])) {
            self::$identityMap[$row[$id]] = $row instanceof ActiveRecord ? $row->toArray() : $row;
            $maxSize = static::getIdentityMapMaxSize();
            foreach (static::getUniqueAttributes() as $uniqueAttribute) {
                self::$uniqueAttributeToId[$uniqueAttribute][$row[$uniqueAttribute]] = $row[$id];
            }
            if ($maxSize !== -1 && count(self::$identityMap) > $maxSize) {
                array_shift(self::$identityMap);
            }
        }
    }
489857
public function setRow($row, $values)
    {

        if (!\is_array($values)) {
            \trigger_error("Values must be an array.", E_USER_ERROR);
            return false;
        }
        if (intval($row) < 1) {
            \trigger_error("Row number must be an integer greater than 1.", E_USER_ERROR);
            return false;
        }

        $i = 0;
        foreach ($values as $value) {
            $this->setCell(array($row - 1, $i), $value);
            $i++;
        }

        return true;
    }
103735
public function setFromArray(array $row = [])
    {
        parent::setFromArray($row);
        try {
            $data = $this->data ? json_decode($this->data, true) : [];
        } catch (\Exception $e) {
            $data = [];
        }
        $this->data = (new DataObject)->setParams($data);
        return $this;
    }
701638
public function import($rows)
    {
        $m = clone $this;
        foreach ($rows as $row) {
            $this->_rawInsert($m, $row);
        }

        return $this;
    }
310440
public function buildRowSql(DataRow $row)
    {
        $sql = parent::buildRowSql($row);

        $table = $this->getTable();

        if ($table->hasAutoIncrementPrimaryKey() && $table->getIdMethod() == IDMethod::NATIVE) {
            foreach ($row->getColumnValues() as $colValue) {
                if ($colValue->getColumn()->isAutoIncrement()) {
                    if ($colValue->getValue() > $this->maxSeqVal) {
                        $this->maxSeqVal = $colValue->getValue();
                    }
                }
            }
        }

        return $sql;
    }
867144
public function addRow($rows = null) {
        if( ! is_array($rows) ) {
            $rows = func_get_args();
        }
        $row = new TableRow;
        foreach( $rows as $arg ) {
            $cell = new TableCell;
            $cell->addChild( $arg );
            $row->addChild( $cell );
        }
        $this->addChild($row);
        return $row;
    }
483431
protected function populateItem($row)
    {
        $class = $row['type'] == Item::TYPE_PERMISSION ? Permission::className() : Role::className();

        if (!isset($row['data']) || ($data = @unserialize($row['data'])) === false) {
            $data = null;
        }

        return new $class([
            'name' => $row['name'],
            'type' => $row['type'],
            'description' => $row['description'],
            'ruleName' => $row['rule_name'],
            'data' => $data,
            'createdAt' => $row['created_at'],
            'updatedAt' => $row['updated_at'],
            'parents' => isset($row['parents']) ? $row['parents'] : null,
        ]);
    }
1207502
public function addRows($rows, Style $style = null)
    {
        if (!is_array($rows) && false === $rows instanceof \Traversable) {
            throw new \InvalidArgumentException('Expected array or traversable object as rows');
        }

        foreach ($rows as $row) {
            $this->addRow($row, $style);
        }
    }
1243457
public function addRow($data = null)
    {
        $this->rowIndex++;
        if (is_array($data)) {
            foreach ($data as $column => $content) {
                $this->rows[ $this->rowIndex ][ $column ] = $content;
            }
        }

        return $this;
    }