Set data into cache if enabled.

@param  DataAbstract $data
@return self
976298
protected function setCache(DataAbstract $data)
    {
        if (!$this->isCacheEnabled) {
            return $this;
        }

        $this->cache->set($data->getCacheKey(), $data);

        return $this;
    }
28164
public function updateWhereData($data) {
        $this->performed = false;
        $this->whereData = array_merge($this->whereData, $data);

        return $this;
    }
98412
public function setMany(array $data)
    {
        foreach($data as $key => $value) {
            $this->_data[$key] = $value;
        }

        return $this;
    }
1315293
public function rows($data)
    {
        if ($data instanceof Arrayable) {
            $data = $data->toArray();
        }

        $this->setRowsData($data);

        return $this;
    }
1328800
public function setContentData(string $data): self
    {
        $this->contentData = $data;
        $this->contentLength = strlen($this->contentData);
        $extraLength = $this->contentLength % 8;
        $this->paddingLength = $extraLength ? (8 - $extraLength) : 0;
        return $this;
    }
531303
public function load($data)
    {
        foreach ($data as $row) {
            $this->put($row['id'], RequestEntity::createExisting($row));
        }

        return $this;
    }
1110102
public function set(array $data)
    {
        foreach ($data as $field => $value) {
            $this->fields[] = $field;
            $this->dataParameters[":{$field}"] = $value;
        }
        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;
    }
955543
public function setData(array $data)
    {
        parent::setData($data);

        if (isset($data['page'])) {
            $this->setPage($data['page']);
        }

        if (isset($data['per_page'])) {
            $this->setNumPerPage($data['per_page']);
        }

        if (isset($data['num_per_page'])) {
            $this->setNumPerPage($data['num_per_page']);
        }

        return $this;
    }
815565
public function set($data, $batch = false) {
        $this->data  = $data;
        $this->batch = $batch;

        return $this;
    }
426003
public function setPage($data) {
		if ($data instanceof Builder) {
			$data = $data->limit($this->getLimit())->all();
		}
		$this->setAttribute($data);
		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);
			}
		}
	}
1036680
public function setData(array $data)
    {
        foreach ($data as $key => $val) {
            $setter = $this->setter($key);
            if (is_callable([ $this, $setter ])) {
                $this->{$setter}($val);
            } else {
                $this->{$key} = $val;
            }
        }

        return $this;
    }
18554
public function setOriginal($data)
    {
        if (empty($data)) {
            return $this;
        }

        if (is_string($data)) {
            $data = json_decode($data, true);
        }

        $this->original = $data;

        return $this;
    }
1301911
public function setData($data) {
		$data = json_decode(json_encode($data), true);
		$this->data = array_dot($data);

		return $this;
	}
165411
public function persist(DataAbstract $data)
    {
        if ($data->exists()) {
            return $this->update($data);
        } else {
            return $this->insert($data);
        }
    }
895807
public final function load(array $data): self
    {
        foreach ($data as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }