Look at my reply. It’s a general one but may be of help here.
I feel like we are on the good track until someone says we’re breaking mvc concept
Just kidding.
I like your ideas! For me the thing is that i lack the knowledge of some of yii’s internals and concepts so for now i will manage all things in one place by extending AR class.
Then i’ll look what comes up and what can be put into a separate class/layer.
I’ll keep it simple, small and quickly configurable.
So conclusions:
-
Data Integrity Layer will be in internally configurable and implemented by overriding __set and __get methods.
-
Data Validation Layer stays untouched. We have scenarios and validate() method.