]> git.andy128k.dev Git - ipf.git/commitdiff
Custom variables in Records
authoravl <alex.litovchenko@gmail.com>
Mon, 13 Oct 2008 10:16:00 +0000 (13:16 +0300)
committeravl <alex.litovchenko@gmail.com>
Mon, 13 Oct 2008 10:16:00 +0000 (13:16 +0300)
ipf/orm/record.php

index 3eef7b0be8a9563bfbc1961db28c956c0a012c64..db6328d65e899beee4ea8102d922e6dd061b5933 100644 (file)
@@ -18,6 +18,7 @@ abstract class IPF_ORM_Record extends IPF_ORM_Record_Abstract implements Countab
     protected $_errorStack;
     protected $_references     = array();
     protected $_pendingDeletes = array();
+    protected $_custom         = array();
     private static $_index = 1;
     private $_oid;
 
@@ -1274,4 +1275,15 @@ abstract class IPF_ORM_Record extends IPF_ORM_Record_Abstract implements Countab
                 $this->$key = $val;
         }
     }
+
+    public function SetCustom($name, $val){
+       $this->_custom[$name] = $val;
+    }
+
+    public function GetCustom($name){
+       if (isset($this->_custom[$name]))
+               return $this->_custom[$name];
+       return null;
+    }
+
 }
\ No newline at end of file