Virtual Attributes does not work for CFormModel

Following Steve Friedl’s article, I’ve been successfully using virtual attributes for my AR models.

I was pretty that the same logic goes for CFormModel. Seems, not.

I’ve got public function getPatientName() declared in my RejestracjaForm form model, but when I’m trying to get it via:


$model = new RejestracjaForm;


$patient = $model->patientName();

it fails with "RejestracjaForm does not have a method named "patientName"." error.

And I have to use $patient = $model->getPatientName(); instead (which works of course).

What am I missing?


$patient = $model->patientName;

Really missing -1 button. I would click it for myself ten times for being such a moron! :expressionless: