Location: PHPKode > scripts > PHP Shelve > php-shelve/Pickle.inc.php
<?
// (C) 2002, Alexander Zhukov <hide@address.com>
class Pickle {
	
	var $_storage;
	
	function Pickle(&$obj)
	{
		$this->_storage = $obj;
	}
	
	function dump(&$obj)
	{
		$this->_storage->write(serialize($obj));
	}
}

class Unpickle {

	var $_storage;

	function Unpickle(&$obj)
	{
		$this->_storage = $obj;
	}

	function & load()
	{
		return unserialize($this->_storage->read());
	}
}
?>
Return current item: PHP Shelve