Location: PHPKode > scripts > Strategy based serializable object registry > strategy-based-serializable-object-registry/libraries/cserializableobjectregistry.php
<?php
defined(ALLOW_EXEC) or die;
CImporter::getInstance()->import("library","iserializable.php");
CImporter::getInstance()->import("library","cobjectregistry.php");

class CSerializableObjectRegistry extends CObjectRegistry implements ISerializable{
    protected $mDriver;
    protected $mFilePath;
    public function __construct($driver,$filepath){
        $this->mDriver = $driver;
        $this->mFilePath = $filepath;
        $this->mDriver->setRegistry($this);
        $this->load();
    }
    public function __destruct(){
        $this->save();
    }
    public function getDriver(){
        return $this->mDriver;
    }
    public function getFilePath(){
        return $this->mFilePath;
    }
    public function load(){
        $this->mDriver->load();
    }
    public function save(){
        $this->mDriver->save();
    }
};
?>
Return current item: Strategy based serializable object registry