Sets the complete data for this model.

This function may be called more than once.

@param array $data the data for this model, may be empty

@return void
484130
public function resetData(array $data)
    {
        $this->data = $data;
        if ($this->existsKey('uid')) {
            if (!$this->hasUid()) {
                $this->setUid((int)$this->data['uid']);
            }
            unset($this->data['uid']);
        }

        $this->markAsLoaded();
        if ($this->hasUid()) {
            $this->markAsClean();
        } else {
            $this->markAsDirty();
        }
    }
874965
public function mergeData(array $data)
    {
        $args = func_get_args();
        foreach ($args as $key => $v) {
            if (is_array($v)) {
                $this->data = array_merge($this->data, $v);
            }
        }
    }
852232
public function setDbData(array $data)
    {
        foreach (array_keys(static::$dbProperties) as $propertyName) {
            if (array_key_exists($propertyName, $data)) {
                $this->setDbValue($propertyName, $data[$propertyName], true);
            }
        }
    }
416429
public function rows(array $data): void
    {
        $this->rows = $data;
        $pdoStatement = $this->provideStatement();
        $this->execute($pdoStatement);
    }
154175
public function merge($data)
	{
		foreach ($data as $key => $value) {
			$this->set($key, $value);
		}
	}
741106
public function setDataFromArray(array $data)
    {
        foreach ($data as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (method_exists($this, $method)) {
                $this->$method($value);
            }
        }
    }
256908
public function set_data( $data ) {

		if ( ! empty( $data[ $this->slug ] ) ) {
			foreach ( $this->child as $child ) {
				if ( method_exists( $child, 'set_data' ) ) {
					$child->set_data( $data[ $this->slug ] );
				}
			}
			$this->data = $data[ $this->slug ];
		}

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

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

        return $this;
    }
366333
public function setData(array $data): self
    {
        $this->data = \array_merge($this->data, $data);

        return $this;
    }
210716
public function updateData(array $data) {
        foreach($data as $name => $value) {
            $this->data[$name] = $value;
        }
    }
427723
public function initialize(array $data = array())
    {
        if($this->exe->flash->has('form_data'))
            $this->set($this->exe->flash->get('form_data'));

        parent::initialize($data);
    }
204287
public function setLoginData(array $data)
    {
        $data = Helpers::parseLoginData($data);
        $this->getUser()->setLoginData($data[User::ID_LOGIN], $data[User::ID_ROLE], $data[User::ID_UNIT], $data[User::LOGOUT_DATE]);
    }
520893
public function setData(array $data)
    {
        foreach ($this->getData()->toArray() as $key => $value) {
            $this->getData()->offsetUnset($key);
        }

        $this->addData($data);

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

        if (!isset($this->data['current'])) {
            $data['current'] = [];
        }

        $this->data['last'] = isset($this->data['current']) ? $this->data['current'] : [];

        $this->data['current'] = [];
    }
233030
public function set(array $data)
    {
        $this->data = [];
        $this->replace = false;

        foreach ($data as $key => $value) {
            $this->add($key, $value);
        }
    }
1148412
public function data($data)
    {
        if ($data instanceof Arrayable) {
            $data = $data->toArray();
        }

        $this->data = $data;
    }
34846
public function fill($data)
    {
        // Field value is already setted.
//        if (!is_null($this->value)) {
//            return;
//        }

        if (is_array($this->column)) {
            foreach ($this->column as $key => $column) {
                $this->value[$key] = array_get($data, $column);
            }

            return;
        }

        $this->value = array_get($data, $this->column);
    }