src/Fuz/Component/SharedMemory/SharedMemory.php
public function setData(\stdClass $data)
    {
        $this->storage->openWriter();
        $object = $this->getObjectSafely('openWriter');
        $object->setData($data);
        $this->storage->setObject($object);
        $this->storage->close();
        return $this;
    }
public function setData(\stdClass $data)
    {
        $this->storage->openWriter();
        $object = $this->getObjectSafely('openWriter');
        $object->setData($data);
        $this->storage->setObject($object);
        $this->storage->close();
        return $this;
    }
public function setData ( \ stdClass $ data ) { $ this -> storage -> openWriter ( ) ; $ object = $ this -> getObjectSafely ( 'openWriter' ) ; $ object -> setData ( $ data ) ; $ this -> storage -> setObject ( $ object ) ; $ this -> storage -> close ( ) ; return $ this ; }
Set the whole object, replacing all its properties and values by the new ones.

This class delivers objects designed to be always safely synchronized
with a file, to allow safe concurrent accesses. To avoid getting in
trouble, you should use lock() method before using getData and
unlock() method after using setData.

@access public
@param \stdClass $data
@return self
@throws \Exception
Set the whole object replacing all its properties and values by the new ones .