Set some data to a search session. This needs to be an array of
data (like the data submitted by a form).

@param array $data An array of data to store in the session

@return self
320572
public function setSearchSession($data)
    {
        $session = $this->getRequest()->getSession();
        return $session->set($this->getSearchSessionName(), $data);
    }
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);
			}
		}

        
    }
459768
public function setData(array $data)
    {
        // Filter data
        foreach ($data as $key => $value) {
            if (isset($this->_data[$key])) {
                $filter = $this->_data[$key]->filter;

                //Only filter if we have a value
                if ($value !== null) {
                    if ($value !== '') {
                        if (!($filter instanceof AnFilterInterface)) {
                            $filter = AnService::get('anahita:filter.factory')->instantiate($filter);
                        }

                        $value = $filter->sanitize($value);
                    } else {
                        $value = null;
                    }

                    $this->_data[$key]->value = $value;
                }
            }
        }

        return $this;
    }
102848
public function setData(array $data)
    {
        if (isset($data['name'])) {
            $this->setName($data['name']);
        }

        if (isset($data['active'])) {
            $this->setActive($data['active']);
        }

        return $this;
    }
694610
public function setData($data) 
	{
		if(is_array($data)) {
			$this->data = $data;
		}
		
		$args = func_get_args();
		$this->data[$args[0]] = $args[1];
		
		return $this;
	}
564136
public function set(array $data)
    {
        foreach ($data as $key => $value) {
            if (method_exists($this, 'set' . $key)) {
                $this->{'set' . $key}($value);
            } else if ($this->customParamsPrefix . $this->shopCommissionCustomParamKey === $key) {
                $this->setShopCommission($value);
            } else if (0 === strpos($key, $this->customParamsPrefix)) {
                $this->setCustomParam(substr($key, 4), $value);
            }
        }

        $this->auth->set($data);
        $this->client->set($data);

        return $this;
    }
1202133
private function setData(array $data)
    {
        $this->data = (array) $data;

        // remove reserved stuff
        if (isset($this->data[self::VAR_CONTROLLER])) {
            unset($this->data[self::VAR_CONTROLLER]);
        }

        return !empty($this->data);
    }
336383
final public function fromArray(Array $data): self
    {
        foreach ($data as $key => $value) {
            $method = 'set' . ucfirst($key);

            if (method_exists($this, $method)) {
                $this->$method($value);
            }
        }

        return $this;
    }
1200295
public function addData($data)
    {
        $data = (array) $data;

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

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

        return $this;
    }
303875
public function setValues(array $data): self
    {
        if (isset($data['values']) && !empty($data['values'])) {
            foreach ($data['values'] as $value) {
                $this->values[] = Value::create($value['value'], $value['end_time']);
            }
        }

        return $this;
    }
206374
public function setData($data)
    {
        // setData() expects array, but we can't prevent users from providing other types.
        // So instead of an exception we just want this input filter to be invalid...
        try {
            parent::setData($data);
            $this->invalidData = null;
            $this->invalidDataTypeException = null;
        } catch (InputFilterInvalidArgumentException $e) {
            $this->invalidData = $data;
            $this->invalidDataTypeException = $e;
        }

        return $this;
    }
554672
public function batch(array $data = [])
    {
        foreach ($data as $column => $value) {
            $this->set($column, $value);
        }
        
        return $this;
    }
87944
public function set(array $data)
    {
        $sql = '';
        foreach ($data as $field => $value) {

            $sql .= $field . ' = ?,';
            $this->oosql_conValues[] = $value;

        }
        $this->sql(rtrim($sql, ','));

        return $this;
    }
1293393
public function setData(array $data)
    {
        $this->isMergingData = true;
        /**
         * @todo Kinda hacky, but works with the concept of form.
         *     Should work embeded in a form group or in a dashboard.
         */
        $data = array_merge($_GET, $data);

        parent::setData($data);

        /** Merge any available presets */
        $data = $this->mergePresets($data);

        parent::setData($data);

        $this->isMergingData = false;

        if ($this->lang()) {
            $this->translator()->setLocale($this->lang());
        }

        return $this;
    }
337739
public function setCache(array $data)
    {
        if (!$this->isCached) {
            $this->memcache->set(
                $this->config['key_prefix'] . '.storage',
                $data,
                false,
                $this->config['expiration_time']
            );
        }

        return $this;
    }
307014
public function setData(array $data)
    {
        $this->data = $this->parseData($data);

        $this->setRules($this->initialRules);

        return $this;
    }
1177015
public function setValues($data)
    {
        foreach ($this->dataFields() as $field) {
            $fieldName = $field->getName();
            if (isset($data[$fieldName])) {
                $field->setValue($data[$fieldName]);
            }
        }
        return $this;
    }