Persist subset to disk
@param $subset
506443
public function saveSubset($subset)
    {
        $changes = $subset . 'Changes';
        if ($this->$changes === true) {
            if (!defined('JSON_PRETTY_PRINT')) {
                $json = json_encode($this->$subset);
            } else {
                $json = json_encode($this->$subset, JSON_PRETTY_PRINT);
            }
            $subsetStoragePath = $this->storagePath . DIRECTORY_SEPARATOR . $subset . '.json';
            file_put_contents($subsetStoragePath, $json);

            $this->$changes = false;
        }
    }
1367303
protected function storeData()
    {
        if ($this->currentCellIsDirty && !empty($this->currentObjectID)) {
            $this->currentObject->detach();

            $obj = serialize($this->currentObject);
            if (!$this->memcache->replace($this->cachePrefix . $this->currentObjectID . '.cache', $obj, null, $this->cacheTime)) {
                if (!$this->memcache->add($this->cachePrefix . $this->currentObjectID . '.cache', $obj, null, $this->cacheTime)) {
                    $this->__destruct();
                    throw new PHPExcel_Exception("Failed to store cell {$this->currentObjectID} in MemCache");
                }
            }
            $this->currentCellIsDirty = false;
        }
        $this->currentObjectID = $this->currentObject = null;
    }
465878
public static function putKey($group, $key)
    {
        self::loadKeys();

        self::$keys[$group] = self::getKeys($group);

        if (!in_array($key, self::$keys[$group])) {
            self::$keys[$group][] = $key;
        }

        self::storeKeys();
    }
739446
function setPersistantFreeze($persistant = false)
    {
        parent::setPersistantFreeze($persistant);
        foreach (array_keys($this->_elements) as $key) {
            $this->_elements[$key]->setPersistantFreeze($persistant);
        }
    }
1170174
def _subset(subset, superset):
    

    result = True
    for k in subset:
        result = k in superset and subset[k] == superset[k]
        if not result:
            break
    return result
968106
public function persist($key)
    {
        $this->init();
        $result = $this->driver->persist($key);
        return (bool)$result;
    }
270898
public function shouldContainsASubset($actual, YamlStringNode $subset)
    {
        $actual = json_decode(json_encode($actual), true);
        Assert::assertArraySubset($subset->toArray(), $actual);
    }
536241
private function storeSection($section, $content)
    {
        if (!isset($this->scope->sections[$section])) {
            $this->scope->sections[$section] = $content;
        }
    }
442071
public function partitionFacts( $variableSet )
	{
		if ( ! $this->var->bindAsSequence ) return;

		$groups = array();

		// This is a bit belt-and-braces but just to be sure
		if ( $this->facts instanceof XPath2NodeIterator )
		{
			$groups[] = $this->facts->CloneInstance();
		}
		else if ( is_array( $this->facts ) )
		{
			$groups[] = DocumentOrderNodeIterator::fromItemset( $this->facts, true );
		}
		else
		{
			$groups[] = DocumentOrderNodeIterator::fromItemset( array( $this->facts ) );
		}

		$this->facts = DocumentOrderNodeIterator::fromItemset( $groups );
	}
392482
public function store($locale)
    {
        foreach ($this->stores as $store) {
            $this->getInstance($store)->store($locale);
        }
    }
1282553
public function forget($key)
    {
        $contents = $this->getContents();
        Arr::forget($contents, $key);

        $this->saveContents($contents);
    }
1314921
public function merge(ObjectSet $set)
    {
        foreach ($set as $object) {
            $this->insert($object);
        }

        return $this;
    }
413054
def remove_subset(set_, subset):
    
    ensure_set(set_)
    ensure_iterable(subset)

    for elem in subset:
        set_.remove(elem)
427615
public function setPersistent($persists)
    {
        if (is_string($persists)) {
            $persists = $persists === 'true' ? true : false;
        }
        $this->persistent = $persists;
    }
1065917
public static function persist(IdentifiableObject $object) : void
    {
        self::repositoryFor(\get_class($object))->persist($object);
    }
60704
public function saveDataset($key, $dataset)
    {
        $data = $this->session->get(self::KEY);
        $data[$key] = $dataset;
        $this->session->set(self::KEY, $data);
        return $this;
    }
755593
protected function setPersistent($offset, $amount)
    {
        $definitionName = $this->getEnvironment()->getDataDefinition()->getName();

        $values = [];

        if ($this->getSessionStorage()->has('limit')) {
            $values = $this->getSessionStorage()->get('limit');
        }

        if ($offset) {
            if (!\is_array($values[$definitionName])) {
                $values[$definitionName] = [];
            }

            $values[$definitionName]['offset'] = $offset;
            $values[$definitionName]['amount'] = $amount;
        } else {
            unset($values[$definitionName]);
        }

        $this->getSessionStorage()->set('limit', $values);
    }