1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-15 12:06:19 +02:00

magic setters/getters only for e_object and NOT e_model and its children (bad things happen)

This commit is contained in:
secretr
2010-12-11 15:37:39 +00:00
parent a907aac8e8
commit a0e0ee73dc
2 changed files with 31 additions and 10 deletions

View File

@ -57,7 +57,7 @@ class e_object
*/ */
function __construct($data = array()) function __construct($data = array())
{ {
if(is_array($data)) $this->_data = $data; if(is_array($data)) $this->setData($data);
} }
/** /**
@ -477,15 +477,6 @@ class e_model extends e_object
*/ */
protected $_cache_force = false; protected $_cache_force = false;
/**
* Constructor - set data on initialization
*
* @param array $data
*/
function __construct($data = array())
{
$this->setData($data);
}
/** /**
* Optional DB table - used for auto-load data from the DB * Optional DB table - used for auto-load data from the DB
@ -1512,6 +1503,34 @@ class e_model extends e_object
$this->_db_table = $this->_field_id = ''; $this->_db_table = $this->_field_id = '';
$this->data_has_changed = false; $this->data_has_changed = false;
} }
/**
* Disable Magic setter
*/
public function __set($key, $value)
{
}
/**
* Disable Magic getter
*/
public function __get($key)
{
}
/**
* Disable
*/
public function __isset($key)
{
}
/**
* Disable
*/
public function __unset($key)
{
}
} }
/** /**

View File

@ -132,6 +132,8 @@ class e_user_model extends e_front_model
*/ */
protected $_editor = null; protected $_editor = null;
protected $_class_list;
/** /**
* Constructor * Constructor
* @param array $data * @param array $data