import

@access  public
@param   array   $data
436903
public function import(array $data)
    {
        $this->_params = $this->arrayUtil->merge($this->_params, $data);
    }
235574
public function import(&$data) {
        $attributes = $this->getAttributes();
        $values = $this->getValues($data);

        $countInserts = 0;
        $chunks = array_chunk($values, $this->maxItemsPerInsert);
        foreach ($chunks as $chunk) {//Execute multiple queries
            $countInserts += \Yii::$app->db->createCommand()
                            ->batchInsert($this->tableName, $attributes, $chunk)->execute();
        }
        return $countInserts;
    }
34041
private function import(&$data)
    {
        $imports = array();
        preg_match_all('/#@([-a-z0-9\/_]+)\\n/is', $data, $imports, PREG_SET_ORDER);
        foreach ($imports as $import) {
            $importPath = FS2LANG . '/' . $this->local . '/' . $import[1] . '.txt';
            $importData = @file_get_contents($importPath);

            // getting file content ok
            if ($importData != false) {
                $importData = str_replace(array("\r\n", "\r"), "\n", $importData); // unify linebreaks
                $this->import($importData);
                $replace = '/#@' . preg_quote($import[1], '/') . '/i';
                $data = preg_replace($replace, $importData, $data);
                // replace all imports recursive
            }
        }
        unset($imports);
    }
426437
public function load(array $data)
    {
        foreach ($data as $index => $value) {
            $this->set($index, $value);
        }
    }
1036009
function load($data = [])
    {
        foreach ($this as $k => $v) {
            if ($k == 'table' || $k == 'where') {
                continue;
            }
            if (isset($data[$k])) {
                $this->$k = $data[$k];
            }
        }
    }
1258690
public function insert($data)
    {
        DB::transaction(function() use($data) {
            $data['code'] = strtolower($data['code']);
            $model        = new Languages($data);
            $model->save();
            $inserts      = $this->prepareMultiInsert($data['code']);
            DB::table('tbl_translations')->insert($inserts);
        });
    }
824257
public function insert(array $data)
    {
        $this->normalizeDataColumns($data);

        $this->setSearchIndexableData($data);

        return $this->app['db']->insert($this->getTable(), $data);
    }
880913
public function add(array $data)
    {
        $result = null;
        $this->hook->attach('file.add.before', $data, $result, $this);

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

        if (empty($data['mime_type'])) {
            $data['mime_type'] = mime_content_type(gplcart_file_absolute($data['path']));
        }

        if (empty($data['file_type'])) {
            $data['file_type'] = strtolower(strtok($data['mime_type'], '/'));
        }

        if (empty($data['title'])) {
            $data['title'] = basename($data['path']);
        }

        $data['created'] = $data['modified'] = GC_TIME;
        $result = $data['file_id'] = $this->db->insert('file', $data);

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

        $this->hook->attach('file.add.after', $data, $result, $this);
        return (int) $result;
    }
370868
protected function fromArray( array $data )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'order/base' );
		$attrManager = \Aimeos\MShop::create( $this->getContext(), 'order/base/service/attribute' );

		if( isset( $data['order.base.id'] ) ) {
			$basket = $manager->load( $data['order.base.id'] )->off();
		} else {
			$basket = $manager->createItem()->off();
		}

		$basket->fromArray( $data, true );

		foreach( $basket->getProducts() as $pos => $product )
		{
			if( isset( $data['product'][$pos]['order.base.product.status'] ) ) {
				$product->setStatus( $data['product'][$pos]['order.base.product.status'] );
			}
		}

		foreach( $basket->getAddresses() as $type => $addresses )
		{
			foreach( $addresses as $pos => $address )
			{
				if( isset( $data['address'][$type][$pos] ) ) {
					$list = (array) $data['address'][$type][$pos];
					$basket->addAddress( $address->fromArray( $list, true ), $type, $pos );
				} else {
					$basket->deleteAddress( $type, $pos );
				}
			}
		}

		foreach( $basket->getServices() as $type => $services )
		{
			foreach( $services as $serviceId => $service )
			{
				$list = [];
				$attrItems = $service->getAttributeItems();

				if( isset( $data['service'][$type][$serviceId] ) )
				{
					foreach( (array) $data['service'][$type][$serviceId] as $key => $pair )
					{
						foreach( $pair as $pos => $value ) {
							$list[$pos][$key] = $value;
						}
					}

					foreach( $list as $array )
					{
						if( isset( $attrItems[$array['order.base.service.attribute.id']] ) )
						{
							$attrItem = $attrItems[$array['order.base.service.attribute.id']];
							unset( $attrItems[$array['order.base.service.attribute.id']] );
						}
						else
						{
							$attrItem = $attrManager->createItem();
						}

						$attrItem->fromArray( $array, true );
						$attrItem->setParentId( $service->getId() );

						$item = $attrManager->saveItem( $attrItem );
					}
				}

				$attrManager->deleteItems( array_keys( $attrItems ) );
			}
		}

		return $basket;
	}
387477
public function importRawData($data)
    {
        $this->modelData = $data;

        foreach ($data as $propertyName => $item) {
            if ($item instanceof ModelState) {
                $this->attachChangeListenerToModelProperty($propertyName, $item);
            }
        }

        // Make sure we can track changes in existing models.
        $this->takeChangeSnapshot();

        $this->onDataImported();
    }
832052
public function import($input)
    {
        if (false !== ($array = $this->getImportableArray($input))) {
            $this->input = array_replace_recursive($this->input, $array);
            $this->cache = [];
        }
    }
1351532
public function import(&$data) {
        $importedPks = [];
        foreach ($data as $row) {
            $skipImport = isset($this->skipImport) ? call_user_func($this->skipImport, $row) : false;
            if (!$skipImport) {
                /* @var $model \yii\db\ActiveRecord */
                $model = new $this->className;
                $uniqueAttributes = [];
                foreach ($this->configs as $config) {
                    if (isset($config['attribute']) && $model->hasAttribute($config['attribute'])) {
                        $value = call_user_func($config['value'], $row);

                        //Create array of unique attributes
                        if (isset($config['unique']) && $config['unique']) {
                            $uniqueAttributes[$config['attribute']] = $value;
                        }

                        //Set value to the model
                        $model->setAttribute($config['attribute'], $value);
                    }
                }
                //Check if model is unique and saved with success
                if ($this->isActiveRecordUnique($uniqueAttributes) && $model->save()) {
                    $importedPks[] = $model->primaryKey;
                }
            }
        }
        return $importedPks;
    }
112415
public function import_pod_items( $data = null, $type = null ) {

		if ( ! empty( $data ) ) {
			$this->input = $data;
		}

		if ( ! empty( $type ) && in_array( $type, $this->types, true ) ) {
			$this->type = $type;
		}

		return false;
	}
177466
public function import(array $data)
    {
        if (count($data) !== 4) {
            throw new \InvalidArgumentException("Invalid footprint array");
        }

        $this->_type = $data[0];
        $this->_constants = $data[1];
        $this->_interfaces = $data[2];
        $this->_parent = $data[3];

        return $this;
    }
254150
public function import( $data = null, $type = null, $delimiter = null ) {

		$this->parse( $data, $type, $delimiter );

		return $this->import_pod_items();

	}
1078337
private function importData($data)
    {
        $this->line(sprintf('Importing %s records...', count($data)));
        $this->line('');

        $this->progress_bar = $this->output->createProgressBar(count($data));

        foreach ($data as $row) {
            $this->processImportRow($row);
        }

        $this->line('     ');
        $this->line('     ');
    }
1013382
public function insert(array $data) : bool {
    $this->query_builder->resetProperties();
    $this->query_builder->setMode('insert');

    $columns = array_keys($data);

    $this->query_builder->setColumns($columns);
    $this->query_builder->setValues($columns);

    try {
      $stmt = parent::prepare($this->query_builder->getQuery());

      return $stmt->execute($data);
    } catch (PDOException $e) {
      $this->pdo_exception = $e;

      return false;
    }
  }