Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于魔术方法的问题 #124

Open
zhongguolu opened this issue Sep 9, 2019 · 2 comments
Open

关于魔术方法的问题 #124

zhongguolu opened this issue Sep 9, 2019 · 2 comments

Comments

@zhongguolu
Copy link

为什么在demo中的UserBean不使用__get与__set魔术方法而是使用写死的get(set)+属性名这种方式,仅仅只是考虑效率的原因,还是将来会加入set/get的注解?

@mikouhero
Copy link

个人理解,工具类比较抽象 更适合使用魔术方法,但是UserBean 作为Model层,比较具体,方便查看具体的属性和方法。

@tioncico
Copy link
Contributor

魔术方法不支持ide自动提示.代码最主要的是直观,易开发,而且,这样也并不会消耗更多的性能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants