From: avl Date: Mon, 13 Oct 2008 10:16:00 +0000 (+0300) Subject: Custom variables in Records X-Git-Tag: 0.5~469 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=b7c65e42ffdff4e1bfd7d4ed59103e6aa4a02353;p=ipf.git Custom variables in Records --- diff --git a/ipf/orm/record.php b/ipf/orm/record.php index 3eef7b0..db6328d 100644 --- a/ipf/orm/record.php +++ b/ipf/orm/record.php @@ -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