From b7c65e42ffdff4e1bfd7d4ed59103e6aa4a02353 Mon Sep 17 00:00:00 2001 From: avl Date: Mon, 13 Oct 2008 13:16:00 +0300 Subject: [PATCH] Custom variables in Records --- ipf/orm/record.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.49.0