Yii Framework Forum: Is It Possible To Have Component And Model With Same Name? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Is It Possible To Have Component And Model With Same Name? Rate Topic: -----

#1 User is offline   Jorgee 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 22-March 13

Posted 12 April 2013 - 08:25 AM

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

How will Yii handle it?

Thanks!
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 14 April 2013 - 03:34 PM

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users