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}; }
public function __get($name) { if ($name == 'table') { return $this->{$name}; } return parent::__get($name); }