从存储服务内重新获取数据并刷新Data实例.

@param Data $data

@return Data
439428
public function refresh(Data $data)
    {
        if ($data->isFresh()) {
            return $data;
        }

        return $this->find($data->id(true), $data);
    }
1114525
public function writeData($data)
	{
		if (strlen($data) - 4 > $this->_limit) {
			$data = $this->_addContinue($data);
		}
		$this->_datasize += strlen($data);

		return $data;
	}
78229
function update($data)
    {
        $update = "";
        foreach ($data as $key => $value)
        {
            $value = $this->db->quote($value);
            if ($value != '' and $value{0} == '`')
            {
                $update = $update . "`$key`=$value,";
            }
            else
            {
                $update = $update . "`$key`='$value',";
            }
        }
        $update = substr($update, 0, -1);
        return $this->db->query("update {$this->table} set $update {$this->where} {$this->limit}");
    }
1220690
public function createNew($data)
    {
        if ($data instanceof File) {
            /** @var $data File */
            $media = new Media();
            if (method_exists($data, 'getClientOriginalName')) {
                $media->setOriginalFilename($data->getClientOriginalName());
            } else {
                $media->setOriginalFilename($data->getFilename());
            }
            $media->setContent($data);

            $contentType = $this->mimeTypeGuesser->guess($media->getContent()->getPathname());
            $media->setContentType($contentType);

            return $media;
        }

        return null;
    }
491839
public function updateData($data) {
		$Model = ClassRegistry::init($this->_authenticateObject->settings['userModel']);
		$Model->id = $this->_user[$Model->primaryKey];
		$userData = $Model->save($data, false);
		$this->_user = array_merge((array) $this->_user, $userData[$Model->alias]);
		$this->Auth->login($this->_user);
		return $userData;
	}
807240
public static function update($data)
    {
        $self      = self::getInstance();

        $table     = $self->table_name;
        $param     = $self->makeUpdateParameter($data);
        $value     = $self->makeInsertParameter($data);

        $statement = "UPDATE {$table} SET {$param} ";
        $execute   = $self->exec($statement, $value);

        return $execute;
    }
592208
protected function internalUpdateFromData(array $data) {
        $initializing = $this->initializing;
        $this->initializing = true;
        $this->readOnlyOverride(function() use ($data) {
            return $this->updateFromData($data);
        });
        $this->initializing = $initializing;
    }
1044755
protected function _read_data($data) {
        // 检查字段映射
        if(!empty($this->_map) && C('READ_DATA_MAP')) {
            foreach ($this->_map as $key=>$val){
                if(isset($data[$val])) {
                    $data[$key] =   $data[$val];
                    unset($data[$val]);
                }
            }
        }
        return $data;
    }
317124
public function create($data)
    {
        $data = $this->retrieveData($data);
        $insertData = [
            'role_id'=> $this->getRoleId(),
            'resource' => $data['resource'],
            'methods'=> implode(',', $data['methods']),
        ];
        $this->table->insert($insertData);

        return $data;
    }
783856
public function data(array $data = null)
    {
        if (is_null($data)) {
            return $this->data;
        }

        $this->data = $data;

        return $this;
    }
178655
public function update_all($data)
    {
        $data = $this->trigger('before_update', $data);
        $result = $this->_database->set($data)
                           ->update($this->_table);
        $this->trigger('after_update', array($data, $result));

        return $result;
    }
165411
public function persist(DataAbstract $data)
    {
        if ($data->exists()) {
            return $this->update($data);
        } else {
            return $this->insert($data);
        }
    }
765941
public function update($id, $data)
    {
        $data = $this->retrieveData($data);
        $updateData = [
            'methods'=> implode(',', $data['methods']),
        ];

        $this->table->update($updateData, ['id' => $id]);

        return $data;
    }
444953
public function setData(&$data)
    {
        /**
         * @var Cell\Cell $cell
         */
        foreach ($this->cells as $cell) {
            $cell->setData($data);
        }
        return $this;
    }
210716
public function updateData(array $data) {
        foreach($data as $name => $value) {
            $this->data[$name] = $value;
        }
    }
264178
public function setData($data)
    {
        $this->data = [];
        $data       = self::normalizeArray($data);

        foreach ($data as $offset => $value) $this->offsetSet($offset, $value);

        return $this;
    }
359564
protected function setData($data = [])
    {
        $defaults = [
            'content'  => '',
            'data'     => null,
        ];

        $this->data = array_merge($defaults, $data);

        return $this;
    }