Add multiple parameters to data
@param array $data  Data array
@param array $parms Parameters to add to data
357027
public function addToData(array $data = array(), array $parms = array())
    {
        foreach ($parms as $parm) {
            $getter = 'get' . ucfirst($parm);
            if (method_exists($this, $getter) && $this->$getter()) {
                $data[$parm] = $this->$getter();
            }
        }

        return $data;
    }
1251274
public function addMultipartParams( $params ) {
		$this->checkMultipartParams( $params );
		$this->multipartParams = array_merge( $this->multipartParams, $params );
		return $this;
	}
1355464
public function addParams(array $params): self
    {
        foreach ($params as $name => $value) {
            $this->addParam($name, $value);
        }

        return $this;
    }
853177
public function setData($data = array())
    {
        

    	//empty local data
    	$this->rows = array();
    	//fill the local data
		foreach($data as $rowId => $cells){
			if(is_array($cells)){
				$this->addRow($rowId, $cells);
			}else if(is_string($cells)){
				$this->addRow($cells);
			}
		}

        
    }
781133
public static function insertStats( array $data )
    {
        foreach( $data as $datapoint)
        {

            $url = $datapoint['url'];
            // always remove fragments
            $url = preg_replace( '/#.*^/', '', $url );
            // optionally remove query string
            if ( self::$options['keep_query_string'] == false )
            {
                $url = preg_replace( '/\?.*/', '', $url );
            }
            // optionally remove unordered view parameters
            if ( self::$options['keep_view_params'] == false )
            {
                $url = preg_replace( '!/\([^?]*!', '', $url );
            }
            $idx = md5( $url );
            if ( isset( self::$urls[$idx] ) )
            {
                self::$urls[$idx]['count'] = self::$urls[$idx]['count'] + 1;
                // we assume increasing monotonic time
                self::$urls[$idx]['last'] = $datapoint['time'];
            }
            else
            {
                self::$urls[$idx] = array(
                    'url' => $url,
                    'count' => 1,
                    'first' => $datapoint['time'],
                    'last' => $datapoint['time']
                );
            }
        }
    }
424883
private function build(array $data)
    {
        $children = array();

        // Create the root node
        $this->nodes[$this->options['rootid']] = $this->createNode(
            array(
                'id'     => $this->options['rootid'],
                'parent' => null,
            )
        );

        foreach ($data as $row) {
            $this->nodes[$row['id']] = $this->createNode($row);
            if (empty($children[$row['parent']])) {
                $children[$row['parent']] = array($row['id']);
            } else {
                $children[$row['parent']][] = $row['id'];
            }
        }

        foreach ($children as $pid => $childids) {
            foreach ($childids as $id) {
                if ($pid == $id) {
                    throw new InvalidParentException(
                        "Node with ID $id references its own ID as parent ID"
                    );
                }
                if (isset($this->nodes[$pid])) {
                    $this->nodes[$pid]->addChild($this->nodes[$id]);
                } else {
                    throw new InvalidParentException(
                        "Node with ID $id points to non-existent parent with ID $pid"
                    );
                }
            }
        }
    }
424019
function add(array $parameters): void
    {
        foreach ($parameters as $parameter => $value) {
            $this->query[$parameter] = $value;
        }
    }
407878
public function addParams($params)
    {
        if (is_null($params)) {
            return;
        }

        if(!is_array($params)) {
            $params = array($params);
        }

        $this->params = array_merge($this->params, $params);
    }
626483
public function addData($data) : void
    {
        Assert::isInstanceOfAny($data, [Chunk::class, X509Certificate::class]);
        $this->data[] = $data;
    }
726986
public function add($data /* $data = null, ... */)
    {
        // bogus "usage" of parameter $data: scrutinizer warns this variable is
        // not used (we're using func_get_args instead to support overloading),
        // but it still needs to be defined because it makes no sense to have
        // this function without argument :)
        $args = array($data) + func_get_args();

        // this method can be overloaded
        foreach ($args as $data) {
            if (is_array($data)) {
                call_user_func_array(array($this, 'add'), $data);
                continue;
            }

            // redefine var
            $data = (string) $data;

            // load data
            $value = $this->load($data);
            $key = ($data != $value) ? $data : count($this->data);

            // replace CR linefeeds etc.
            // @see https://github.com/matthiasmullie/minify/pull/139
            $value = str_replace(array("\r\n", "\r"), "\n", $value);

            // store data
            $this->data[$key] = $value;
        }

        return $this;
    }
1155220
private function setData(array $data)
    {
        if ( ! empty($data))
        {
            $this->setOption(CURLOPT_POSTFIELDS, $this->optionParser->parseData($data));
        }
        else
        {
            $this->unsetOption(CURLOPT_POSTFIELDS);
        }
    }
450317
public function setParams($params)
    {
        // $param should be a single key => value pair
        if (is_array($params)) {
            foreach ($params as $key => $param) {
                $this->params[$key] = $param;
            }
        }
    }
813144
public function addParameters(&$params)
    {
        $params['grant_type'] = $this->getType();
        $params['username'] = $this->username;
        $params['password'] = $this->password;
    }
437957
public function setFromArray(array $data): void
	{
		foreach ($data as $parameter => $value) {
			$this->bindings[$parameter] = new Bind($parameter, $value);
		}
	}
1332862
public function specifyAdditionalParameters(array $data, array $additionalParams): array
    {
        foreach ($additionalParams as $param) {
            $method = 'get' . ucfirst($param);
            if (method_exists($this, $method)) {
                $value = $this->{$method}();
                if ($value) {
                    $data[$param] = $value;
                }
            }
        }
        return $data;
    }
459700
private function prepareMultipartParameters(array $params): array
    {
        $postDataMultipart = [];
        foreach ($params as $key => $value) {
            // If $value is not an array we cast it to an array
            foreach ((array) $value as $subValue) {
                $postDataMultipart[] = [
                    'name' => $key,
                    'content' => $subValue,
                ];
            }
        }

        return $postDataMultipart;
    }
1163072
protected static function saveExtraParams(array $data)
    {
        $final_data = array();
        if (count($data) > 0) {
            Logger::log('Saving extra configuration parameters');
            foreach ($data as $key => $value) {
                if (null !== $value || $value !== '') {
                    $final_data[$key] = $value;
                }
            }
        }
        return $final_data;
    }