Add rows.

@param array $data The row data.

@return FakeResult
4459
public function addRows($data)
    {
        foreach ($data as $key => $row) {
            $this->addRow($row, isset($row['id']) ? $row['id'] : $key);
        }

        return $this;
    }
1008998
public function setColumns(array $data)
    {
        unset($this->query['columns']);
        foreach ($data as $field => $value) {
            $this->addColumn($field, $value);
        }
        return $this;
    }
364644
protected function attachAppends(array $data)
    {
        $appends = [];
        foreach ($this->appends as $key => $value) {
            if (is_callable($value)) {
                $appends[$key] = value($value($this->getFilteredQuery()));
            } else {
                $appends[$key] = $value;
            }
        }

        return array_merge($data, $appends);
    }
671879
public static function add(array $data)
    {
        $model = Yii::createObject(static::className());
        $model->setAttributes($data);
        return $model->save() ?: $model;
    }
511278
public function addDataArray(array $data)
    {
        $this->data = $data;
        $this->pager->setTotalRows(\count($this->data));

        return $this;
    }
828579
public function add(array $data)
    {
        $result = null;
        $this->hook->attach('country.add.before', $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $result = true;
        $this->db->insert('country', $data);
        $this->hook->attach('country.add.after', $data, $result, $this);
        return (bool) $result;
    }
146679
public function add(array $data)
    {
        $result = null;
        $this->hook->attach('product.add.before', $data, $result, $this);

        if (isset($result)) {
            return (int) $result;
        }

        $data['created'] = $data['modified'] = GC_TIME;
        $data += array('currency' => $this->config->get('currency', 'USD'));

        $this->setPrice($data);

        $result = $data['product_id'] = $this->db->insert('product', $data);

        $this->setTranslations($data, $this->translation_entity, 'product', false);
        $this->setImages($data, $this->file, 'product');

        $this->setSku($data, false);
        $this->setSkuCombinations($data, false);
        $this->setOptions($data, false);
        $this->setAttributes($data, false);
        $this->setAlias($data, $this->alias, 'product', false);
        $this->setRelated($data, false);

        $this->search->index('product', $data);
        $this->hook->attach('product.add.after', $data, $result, $this);
        return (int) $result;
    }
797345
private function addVerticesFromArray(array $data)
    {
        $_documentClass = $this->_documentClass;

        $this->_result[] = $_documentClass::createFromArray($data, $this->_options);
    }
96406
public function add($data = null) {
		if (is_array($data)) {
			foreach ($data as $elem) {
				$this->add($elem);
			}
		} else {
			$guid = $this->toGUID($data);
			if ($guid) {
				array_push($this->guids, $guid);
				sort($this->guids);
			}
		}
		return $this;
	}
1101996
public function insert(array $data) {
        $this->notifyObservers('beforeInsert', array($this, &$data));
        $pkData = parent::insert($data);
        $this->notifyObservers('afterInsert', array($this, $data, $pkData));
        return $pkData;
    }
1004090
public function insertUpdate(array $data)
    {
        $affected = $this->update($data);
        return $affected ?: $this->insert($data);
    }
1131829
public function add($data = [])
    {
        $insertId = $this->db->insert($data)->into($this->table)->execute(FALSE);

        return $insertId;
    }
802323
public function batchInsert(array $data)
    {
        $ids = [];
        foreach ($data as $item) {
            if (isset($item['id'])) {
                if (array_key_exists($item['id'], $this->table->data['data'])) {
                    continue;
                }
            } else {
                $item = ['id' => $this->generateId()] + $item;
            }

            $ids[] = $this->insert($item);
        }

        return $ids;
    }
327381
public function addEntry($data = [])
    {
        if(!$data)
            return false;
        (!isset($data[$this->databaseConfig->getIdentifier()])) ? $this->clearIdentifier() : $this->get($data[$this->databaseConfig->getIdentifier()]);
        foreach ($data as $name => $value){
            if ($this->checkField($name))
                $this->tableFields->{$name} = utf8_encode($value);
        }
        return $this->save();
    }
1200295
public function addData($data)
    {
        $data = (array) $data;

        if (empty($data)) {
            return $this;
        }

        foreach ($data as $key => $value) {
            $this->setData($key, $value);
        }

        return $this;
    }
524755
public function add(array $data)
    {
        if (!$this->isDb()) {
            return false;
        }

        $data += array(
            'created' => GC_TIME,
            'log_id' => gplcart_string_random(6)
        );

        try {
            $result = (bool) $this->db->insert('log', $data);
        } catch (Exception $ex) {
            $result = false;
        }

        return $result;
    }
1318528
public function populate(array $data)
    {
        foreach ($data as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
        return $this;
    }