开发者

symfony: difference between doctrine model "User" and symfony "myUser"?

开发者 https://www.devze.com 2022-12-30 15:06 出处:网络
what is the difference between the symfony \"myUser\" and doctrine model \"User\"? where should i put the methods for an user?

what is the difference between the symfony "myUser" and doctrine model "User"?

where should i put the methods for an user?

eg. $user->createThread(), $user->deleteThread() and so on

should $user be an instance of the doctrine model User (cause i have a table called User) or the myUser that extends s开发者_StackOverflowfBasicSecurityUser?

thanks!


The User doctrine model represents a user in your database - his/her ID, username, et cetera.

The myUser symfony class represents the user's current session - usually stores if a user is logged in or not, his/her credentials, and so on.

From the above two, you should put those functions in the User doctrine class.

0

精彩评论

暂无评论...
验证码 换一张
取 消