-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Some keywords for models don't support getters/setters #11548
Comments
I've read #11253 issue. And I disagree that functional words which are used in relational DB have to be used as columns names. it can cause many problems, so I do not see any reasons why they are can be used here. This is really, really, really strange decision. |
So don't use them. Why should your opinion prohibit others from using perfectly ok functionality? |
Its obvious that they dont support them beacause Phalcon\Mvc\Model already have methods like get/setSource, get/setTransaction etc There is no way to fix it. This problem can occur always. Its not a bug. https://github.com/phalcon/cphalcon/blob/master/phalcon/mvc/model.zep Anything after set/getAnything from here cant occur in your class as property or getters/setters wouldnt work. I think its obvious ? That's why many frameworks dont provide themselves with classes like Model or Entity, which you have to extend. It's one of bad things in phalcon that you have extends Phalcons' model class to have models in your application. Fixing this problem would need to introduce repository classes in phalcon where it mostly would be like current |
There are ways to fix this (you, in fact, mention some options) and, while it's not necessarily a bug, it's certainly a valid feature request. |
I think it's too much effort for now. Better to focus on finally supporting php 7. I guess in something like version 3 maybe they will think about changing model related things to working without extending classes. |
I could not agree more with the last statement (php 7). Thanks. |
Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues |
In relation to #11253 some of the keywords don't support getters and setters because Phalcon has conflicting function names. The ones I've found: source and transaction (probably schema too, but I haven't tried that).
The text was updated successfully, but these errors were encountered: