Skip / ignore magic methods
castamir opened this issue · 5 comments
Why? They can be called directly.
@JanTvrdik: Is it worth it? Can you provide any real-world use case where you would call these directly without overloading them first? (They should at least have lower/lowest priority in the list.)
Can you provide any real-world use case where you would call these directly without overloading them first?
Edit: I didn't notice the "without overloading them first" part. In that case parent::__get($name)
is sometimes used.
By saying:
Can you provide any real-world use case where you would call these directly without overloading them first?
I meant using $this->__get($name)
without actually overriding this method.
The thing is, I was thinking about this idea of hiding magic methods, only under the condition they are not declared elsewhere than on Nette\Object. So the default implementation (just extending Nette\Object) would not include magic methods in completion, but when you override any magic method (regardless of calling its parent method), it would be then visible as usual.