Add field

@param array $data

@return void
423303
private function addFields(array $data)
    {
        if (!empty($data)) {
            curl_setopt($this->ch, CURLOPT_POSTFIELDS, http_build_query($data));
        }
    }
767203
public function addFields(array $data, string $contentType = 'text/plain') {
        foreach ($data as $key => $value) {
            $this->addField($key, $value, $contentType);
        }
    }
914078
public function addField($field, $value=null) {
        $this->fields[] = $field;
        if ($value != null) $this->set($field, $value);
    }
293823
public function add($data = [])
	{
		if (isset($data['email']) && isset($data['username']) && isset($data['password'])) {
			// todo asserts
			$create = array(
				'email' => $data['email'],
				'username' => Strings::webalize($data['username']),
				'password' => Passwords::hash($data['password']),
			);

		} else {
			throw new \InvalidArgumentException('We need username, email and password');
		}

		if (isset($data['role'])) {
			$create['role'] = $data['role'];
		} else {
			$create['role'] = 'user';
		}

		if (isset($data['name'])) {
			$create['name'] = $data['name'];
		}

		/** @var \Nette\Http\FileUpload $data ->avatar */
		if ($this->useFiles && $data['avatar'] && $data['avatar']->isOk()) {
			$create['avatar'] = $this->saveImage($data['avatar']);
		}

		$person = $this->repository->insert($create);

		return $person;
	}
1074148
public function add($key, $data)
    {
        $toInsert = $this->getDocumentData($data);

        $result = $this->collection->insertOne($toInsert);

        $data->_id = $result->getInsertedId();
    }
568315
public static function addData($data, $key = NULL)
    {
        $currentPointer = end(self::$currentPointerStack);
        if (!isset(self::$stackLog[$currentPointer]['messages'])) {
            self::$stackLog[$currentPointer]['messages'] = array();
        }
        if (is_null($key)) {
            self::$stackLog[$currentPointer]['messages'][] = $data;
        } else {
            self::$stackLog[$currentPointer]['messages'][$key] = $data;
        }
    }
233030
public function set(array $data)
    {
        $this->data = [];
        $this->replace = false;

        foreach ($data as $key => $value) {
            $this->add($key, $value);
        }
    }
122614
public function addData(array $data, bool $overwrite = true): void
    {
        if ($overwrite) {
            $this->data = array_merge($this->data, $data);
        } else {
            $this->data = array_merge($data, $this->data);
        }
    }
444742
public function addItems($data)
	{
		if( is_null($data) )
		{
			return;
		}

		if( $data instanceof stdClass )
		{
			$data = [$data];
		}

		if( is_array($data) )
		{
			$data = $this->checkItems($data);
			$this->data = array_merge($this->data, $data);
		}
	}
1155220
private function setData(array $data)
    {
        if ( ! empty($data))
        {
            $this->setOption(CURLOPT_POSTFIELDS, $this->optionParser->parseData($data));
        }
        else
        {
            $this->unsetOption(CURLOPT_POSTFIELDS);
        }
    }
712795
function addData( $cdata ) {
		// check we're in a valid field
		if ( isset( $this->data[$this->row][$this->current_field] ) ) {
			// add data to field
			$this->data[$this->row][$this->current_field] .= $cdata;
		}
	}
937470
function addField( $attributes ) {
		if( isset( $attributes['NAME'] ) ) {
			$name = $attributes['NAME'];
		} else {
			$name = count($this->data[$this->row]);
		}

		// Set the field index so we know where we are
		$this->current_field = $this->FieldID( $name );
	}
20375
public function add( $data )
	{
		$columnNum = 0;
		$rowNum = $this->_iterator->current()->getRowIndex();

		foreach( (array) $data as $value ) {
			$this->_sheet->setCellValueByColumnAndRow( $columnNum++, $rowNum, $value );
		}

		$this->_iterator->next();
	}
1110102
public function set(array $data)
    {
        foreach ($data as $field => $value) {
            $this->fields[] = $field;
            $this->dataParameters[":{$field}"] = $value;
        }
        return $this;
    }
85971
public function import($data) {
		
		if (! is_array($data)) {
			$data = $this->makeArray($data);
		}
		
		foreach($data as $key => $value) {
			$this->set($key, $value);
		}
	}
1131829
public function add($data = [])
    {
        $insertId = $this->db->insert($data)->into($this->table)->execute(FALSE);

        return $insertId;
    }
437957
public function setFromArray(array $data): void
	{
		foreach ($data as $parameter => $value) {
			$this->bindings[$parameter] = new Bind($parameter, $value);
		}
	}