Reads the entity data.
@param DataContainer $data
@return $this
322412
public function readData(DataContainer $data)
    {
        $this->requiredModName = $data->getString('m', '');
        $this->requiredVersion = $data->getString('v', '');
        $this->isMandatory = $data->getInteger('r', 0) === 1;
        return $this;
    }
837646
public function fromArray($data)
    {
        foreach ($data as $key => $value) {
            if (is_int($key) || $this->isFillable($key)) {
                $this->set($key, $value);
            }
        }
        return $this;
    }
1166295
public function setAllData($data)
    {
        array_walk(
            $data,
            function ($value, $key) {
                $this->{$key} = $value;
            }
        );

        return $this;
    }
1127226
public function setParent(DataContainer $parent = null)
	{
		$this->parent = $parent;

		if ($this->parent)
		{
			$this->enableParent();
		}
		else
		{
			$this->disableParent();
		}

		return $this;
	}
388000
public function withData($data): self
    {
        $new = clone $this;
        $new->data = $data instanceof MessageData ? $data : MessageData::fromArray($data);

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

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

        return $this;
    }
1347890
public function setData($data)
    {
        // Format data
        $data = $this->format($data, $this->_format);
        // CI Output
        $this->ci->output->set_output($data);

        return $this;
    }
111809
public function setData($data)
    {
        foreach ($data as $field => $value) {
            $this->set($field, $value);
        }
        return $this;
    }
469008
public function setData($data)
    {
        $this->defaultDicionarioData();

        // ID de dados na tabela
        if (!empty($data)) {
            if (is_numeric($data)) {
                $read = new Read();
                $read->exeRead($this->entity, "WHERE id = :id", "id={$data}");
                if ($read->getResult()) {
                    $dataRead = $read->getResult()[0];
                    foreach ($this->getAssociationMult() as $meta)
                        $dataRead[$meta->getColumn()] = $this->readMultValues($meta, $dataRead['id']);

                    $this->setDataArray($dataRead);
                } else {
                    $this->search(0)->setError("Id não existe");
                }

            } elseif (is_array($data)) {
                if (!empty($data[0]) && is_object($data[0]) && get_class($data[0]) === "Entity\Meta") {
                    $metas = $data;
                    $data = [];
                    foreach ($metas as $meta) {
                        if (!empty($meta->getValue()) && !empty($meta->getColumn()))
                            $data[$meta->getColumn()] = $meta->getValue();
                    }
                }

                if (!empty($data))
                    $this->setDataArray($data);
            }

            Validate::dicionario($this);
        }
    }
868587
public function appendDataBuffer($data)
    {
        if (is_null($this->dataBuffer)) {
            $this->dataBuffer = $data;
        } else {
            $this->dataBuffer .= $data;
        }
        return $this;
    }
344542
public function setData($data)
    {
        foreach ($data as $key => $dtoData) {
            $this->data[$key] = new RuneDto($dtoData);
        }
    
        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;
    }
1221185
public function init($data = null)
    {
        if ($this->initialized) {
            return $this;
        }

        if (is_null($data)) {
            $data = $this->fetchData();
        }

        if ($this->isInitialized($data)) {
            $this->initialized = true;
        }

        $this->data = $data;
        if ($this->initialized) {
            $this->onData($data);
        }

        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;
    }
1242834
public function setData($data)
	{
		if( is_null($data) )
		{
			$data = new stdClass();
		}

		if( $data instanceof stdClass )
		{
			$this->data = $data;
		}
		else
		{
			$this->data = (object) $data;
		}
		
		$this->id = $this->data->{$this->idKey};
		$this->type = $this->data->{$this->typeKey};

		$dataVars = get_object_vars($this->data);
		foreach ($this->guarded as $guardedProperty)
		{
			if( array_key_exists($guardedProperty, $dataVars) )
			{
				$this->protected[$guardedProperty] = $this->data->$guardedProperty;
				unset($this->data->$guardedProperty);
			}
		}
	}
157820
public function data($data = []) {
		$bind =& $this->_entity;

		if ($data) {
			$bind ? $bind->set($data) : $this->_data = array_merge($this->_data, $data);
			return $this;
		}
		$data = $bind ? $bind->data() : $this->_data;
		return ($list = $this->_config['whitelist']) ? array_intersect_key($data, $list) : $data;
	}
381554
public function read()
    {
        $container = $this->getDao()->read();
        $this->setValues($container->getValues());
        return $this;
    }