<?php
$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] ?: array()) + array("_23754467a7" . "8df96d0d70f" . "6e7f290e37f" => base64_decode("ICM" . "="), "_8513924a0ff2f" . "1ee2a69066c615" . "852a8" => base64_decode("QXR0ZW1wdCB0byBhY2Nlc3MgaW52YWxpZ" . "CBwcm9wZXJ0eSA="), "_0c5123aa7" . "44f69bbc0e" . "8b3ea2f6e8" . "47d" => base64_decode("bG" . "1z" . "Zw" . "=="), "_8ab6ddf" . "42088608" . "c501fcde" . "d8995e76" . "c" => base64_decode("I" . "A" . "=" . "="), "_fc9d7314a9d9958d8fa" . "0a403ba8ff197" => base64_decode("Z2V0X2NsYX" . "Nz"), "_29225c3f2cb4b5bb8cdfecad11c6" . "f491" => base64_decode("Og" . "=="), "_62d701c3c53404f06345e" . "b35720a47b4" => base64_decode("aXNfbnV" . "tZXJpYw" . "=="), "_42bd6b7ed036a15" . "d831d3821016f8e5" . "9" => base64_decode("RmFpbGVk" . "IHRvIHNh" . "dmUg"), "_c5755b4703f57d87d04186ec758592b" . "9" => base64_decode("Y29tbW" . "9uLm5v" . "dF9mb3" . "VuZA=="));




abstract class ActiveRecord extends ErrorHandler implements ActiveRecordInterface
{
    
    
    
    
    
    
    protected static $shared_storage;
    
    
    
    
    
    
    protected $storage;
    
    
    
    
    
    
    protected $db_values;
    
    
    
    
    
    
    private static $columns = array();
    
    
    
    
    
    
    
    public function LoadFromArray($_b8cfc2e06d9d1fec1893ea4a054002bf)
    {
        $this->db_values = $_b8cfc2e06d9d1fec1893ea4a054002bf;
        return true;
    }
    
    
    
    
    
    public function Load($_0ea4e32b57963ac0cb3057e03e9aef64)
    {
        if (!$this->GetStorage()->Load($this, $_0ea4e32b57963ac0cb3057e03e9aef64)) {
            return $this->SetErrMsg($GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_fc9d7314a9d9958d8fa0a403ba8ff" . "197"]($this) . $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_23754467a7" . "8df96d0d70f" . "6e7f290e37f"] . $_0ea4e32b57963ac0cb3057e03e9aef64 . $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_8ab6ddf" . "42088608" . "c501fcde" . "d8995e76" . "c"] . $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_0c5123aa744f69bbc0e8" . "b3ea2f6e847d"]($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_c5755b4703f57d8" . "7d04186ec758592b" . "9"]));
        }
        return true;
    }
    
    
    
    
    public function Save()
    {
        $_18cb991d3787967aac03336ac7811b3d = $this->GetStorage()->Save($this);
        if ($_18cb991d3787967aac03336ac7811b3d) {
            if ($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_62d701c3c53404f0634" . "5eb35720a47b4"]($_18cb991d3787967aac03336ac7811b3d)) {
                $this->SetProperty($this->GetStorage()->GetDbIdentity($this), $_18cb991d3787967aac03336ac7811b3d);
            }
            return true;
        }
        return $this->SetErrMsg($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_42bd6b7ed036a15d83" . "1d3821016f8e59"] . $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_fc9d7314a9d995" . "8d8fa0a403ba8ff" . "197"]($this));
    }
    
    
    
    
    public function Delete()
    {
        return $this->GetStorage()->Delete($this);
    }
    
    
    
    
    
    public function GetProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a)
    {
        $_cf58d50fa50aab09e047075c4b2206cd = $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_fc9d7314a9d9958d8f" . "a0a403ba8ff197"]($this);
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd])) {
            self::$columns[$_cf58d50fa50aab09e047075c4b2206cd] = $this->GetStorage()->GetDbColumns($this);
        }
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd][$_ce76a91ef2b7be07d7d04e74d4da9b6a])) {
            throw new InvalidArgumentException($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_8513924a0ff2f1ee2a69066" . "c615852a8"] . $_cf58d50fa50aab09e047075c4b2206cd . ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_29225c3f2cb4b5bb8cdfecad1" . "1c6f491"] . $_ce76a91ef2b7be07d7d04e74d4da9b6a));
        }
        return isset($this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a]) ? $this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a] : null;
    }
    
    
    
    
    
    
    protected function SetProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a, $value)
    {
        $_cf58d50fa50aab09e047075c4b2206cd = $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_fc9d7314a9d9958d8fa0a403ba8" . "ff197"]($this);
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd])) {
            self::$columns[$_cf58d50fa50aab09e047075c4b2206cd] = $this->GetStorage()->GetDbColumns($this);
        }
        if (!isset(self::$columns[$_cf58d50fa50aab09e047075c4b2206cd][$_ce76a91ef2b7be07d7d04e74d4da9b6a])) {
            throw new InvalidArgumentException($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_8513924a0ff2f1ee2a69066c6158" . "52a8"] . $_cf58d50fa50aab09e047075c4b2206cd . ($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_29225c3f2cb4b5bb" . "8cdfecad11c6f491"] . $_ce76a91ef2b7be07d7d04e74d4da9b6a));
        }
        $this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a] = $value;
        return true;
    }
    
    
    
    
    public function GetId()
    {
        return $this->GetProperty($this->GetStorage()->GetDbIdentity($this));
    }
    
    
    
    
    
    public function __get($_ce76a91ef2b7be07d7d04e74d4da9b6a)
    {
        return $this->GetProperty($_ce76a91ef2b7be07d7d04e74d4da9b6a);
    }
    
    
    
    
    
    public function __isset($_ce76a91ef2b7be07d7d04e74d4da9b6a)
    {
        return isset($this->db_values[$_ce76a91ef2b7be07d7d04e74d4da9b6a]);
    }
    
    
    
    
    
    public static function Create($_fd62bc4eaaf7d58dea9bada3e30443b9)
    {
        $_68ffaaa31e3ba49ed9d6159fbee9f043 = new static();
        $_68ffaaa31e3ba49ed9d6159fbee9f043->LoadFromArray($_fd62bc4eaaf7d58dea9bada3e30443b9);
        return $_68ffaaa31e3ba49ed9d6159fbee9f043;
    }
    
    
    
    
    
    
    
    
    
    public function GetStorage() : ObjectsStorage
    {
        return $this->storage ?? static::GetSharedStorage();
    }
    
    
    
    
    
    
    public function SetStorage(ObjectsStorage $_ee97244432473014aa9408ee5cf1f596)
    {
        $this->storage = $_ee97244432473014aa9408ee5cf1f596;
    }
    
    
    
    
    
    
    
    
    
    public static function GetSharedStorage() : ObjectsStorage
    {
        return static::$shared_storage ?? ObjectsStorage::I();
    }
    
    
    
    
    
    
    
    
    public static function SetSharedStorage(ObjectsStorage $_ee97244432473014aa9408ee5cf1f596)
    {
        static::$shared_storage = $_ee97244432473014aa9408ee5cf1f596;
    }
}