Auto Assigment of Widget does not use setter Methods

Hi Folks,

i have recently switched from Prado and I started playing around with Yii a week ago.

I notice that the setter method will not be called if the referring attribute is either  public or protected. Only on private members the appropiate setter is called.

Is this intended? Personally i would prefer to always call the setter method if one exists.

If you already have a public member $a, then $object->a will always refer to this member according to PHP syntax.

Yes I know, because thats what it currently does :) I just wanted to know if it is intended to not use setter even if there is one.

The problem is yii is acting differently based on the class you want to assign a value to.

If you assign a value to a custom component through the main configuration you need a setter for protected members.

If you assign a value to a widget you do not need a setter for protected members.

That is because the object that assigns a value to a widget is in the same inhertitance line as the widget itself and thus can assign a protected property. But that is not true with the application configuration and a component.