Is It Possible To Have Component And Model With Same Name?

Hi, just a quick question, is it possible to have ADUserIdentity component and ADUserIdentity Model?

How will Yii handle it?


Not tested but it should work if you use namespaces. You could e.g. use application\components\ADUserIdentity and application\models\ADUserIdentity. The drawback is that you always have to use the full namespace path if you use any of these classes.

Of course you also have to define the namespace in each of the class files.