I am writing application in Yii2 framework. It has User
model used by Controllers. This model has these methods:
- classic methods for database entity management
- methods for management files of user
- authentification and authorisation methods
I think, this class violate Sigle Responsibility Principle (SRP), becouse it has at least 3 reasons to change. Its functionality could also split into separate classes (models/components/something else). So I thought to redesign this and apply something, what can fix this. But I don't know how can I do this by using Yii2 and not to violate MVC principle. The best solution could be use som Yii2 features. Should I split this one model to more components or even models? Should I redesign my database and normalize my user table? What could be the best possible solution?