(12-30-2014, 10:11 AM)includebeer Wrote: Why would it cough up CI properties?
Code:
public function __get($key)
{
// Debugging note:
// If you're here because you're getting an error message
// saying 'Undefined Property: system/core/Model.php', it's
// most likely a typo in your model code.
return get_instance()->$key;
}
That's what this code does. The primary purpose of extending CI_Model is more or less to utilize this function, usually for the purposes of accessing $this->db from within your model.