public function __set($strKey, $varValue) { switch ($strKey) { case 'objEditRecord': if ($varValue instanceof \Database\Result) { $this->objEditRecord = $varValue; } break; default: return parent::__set($strKey, $varValue); break; } }