Stores the data in the cache
Note: Repeatedly calling this will overwrite the existing data
@param mixed $data
515048
public function putInCache($data)
    {
        if (!$data) {
            throw new CacheException("No data provided for storing in the cache");
        }

        $serializationEnabled = static::config('serialize');

        if(!$serializationEnabled && !is_scalar($data)) {
            throw new CacheException("Trying to store non-scalar data with serialization disabled");
        }

        $data = $serializationEnabled ? serialize($data) : $data;


        if($this->isCached() && !is_writable($this->filePath())) {
            throw new CacheException(sprintf("File '%s' is not writable", $this->filePath()));
        }

        $success = file_put_contents($this->filePath(), $data);

        if ($success === false) {
            throw new CacheException("Couldn't write to file: {$this->file}");
        } 

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

		return $data;
	}
16808
public function setOriginal($data)
    {
        if (is_array($this->column)) {
            foreach ($this->column as $key => $column) {
                $this->original[$key] = array_get($data, $column);
            }

            return;
        }

        $this->original = array_get($data, $this->column);
    }
279202
protected function persist(array $data)
    {
        Assertion::notEmpty(
            $this->persistors,
            'No persistor attached.',
            DataAggregatorException::NO_PERSISTOR_ATTACHED
        );

        foreach ($this->persistors as $persistor) {
            try {
                $persistor->persist($data);

            } catch (PersistorException $e) {
                $this->getLogger()->error($e->getMessage());
            }
        }
    }
177105
public final void overwrite(Map<Object, Object> data) {
        internalData.clear();
        internalData.putAll(data);
    }
1277261
protected function saveToCache($data)
    {
        $fh = fopen($this->filePath, 'w');
        if (flock($fh, LOCK_EX)) {
            fwrite($fh, $data);
            flock($fh, LOCK_UN);
        }
        fclose($fh);
        $this->log->debug("Cache file {$this->filePath} saved");
    }
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);
			}
		}

        
    }
439791
protected function assign($data)
    {
        if (!is_null($data)) {
            foreach ($data as $key => $value) {
                $this->set($key, $value);
            }
        }
    }
515673
public function remove($data)
    {
        $data = $this->fetchRemainingSegment($this->data, $data);
        if (! is_null($data)) {
            $this->set($data);
        }
    }
980227
public function save(array $data)
    {
        return (bool) file_put_contents($this->file, $this->serializer->serialize($data));
    }
1097548
protected function saveEntity($data)
    {
        if ($data instanceof AbstractData) {
            $data->setUpdatedAt(new \DateTime());
        }
        parent::saveEntity($data);
    }
1004651
public function set($data)
    {
        $this->config = array_merge($data, $this->config);

        $this->mergeWithLaravelConfig();
    }
863450
public function set_data( $data ) {

		$this->instance = 0;
		foreach ( (array) $data[ $this->slug ] as $instance => $instance_data ) {
			foreach ( $this->child as $child ) {
				if ( method_exists( $child, 'set_data' ) ) {
					$child->set_data( $instance_data );
				}
			}
			$this->instance ++;
		}
		$this->instances = $this->instance;
		$this->instance  = 0;

	}
1167519
function push($data)
    {
        if(is_array($data) or is_object($data)) $data = serialize($data);
        //入队
        $this->data[] = $data;
        if($this->put_save) $this->save();
    }
61922
public function setData(array $data): void {
		if ($this->compiled) {
			throw new ViewException("Attempt to alter view after compilation.", ViewException::AFTER_COMPILE_ALTERATION);
		}
		// to avoid overwriting any data that has already been set
		// using setDatum(), we don't want to do a simple assignment.
		// instead, we'll more carefully copy information from $data
		// to the data property.
		
		foreach ($data as $index => $datum) {
			$this->setDatum($index, $datum);
		}
	}
280540
public function setData($data)
    {
        $this->valid = false;
        $this->hash = md5($data, false);
        $this->rawData = explode("\n", $data);
    }
244168
public function set_data($data) {
        if (!isset($data['sharing'])) {
            // Set the default value here. mforms doesn't handle defaults very nicely.
            $data['sharing'] = cache_administration_helper::get_definition_sharing_options(cache_definition::SHARING_DEFAULT);
        }
        parent::set_data($data);
    }