User "Catrope" posted a comment on MediaWiki.r85288.

Full URL: 
https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/85288#c17525
Commit summary:

Implement magic accessors for RequestContext variables: you can now just call 
$context->request->stuff(), and that is internally mapped to the get accessor.  
Rename the private variables to the old $mName syntax: I know that that's 
"discouraged in new code", but in this case it stops over-clever IDEs 
highlighting the magic accesses as potential visibility errors and sticking big 
error tags on them.

Comment:

I never knew <code>__get()</code> had this problem, yet I've used it 
successfully in another project. The important thing is that you can't use the 
magic behavior '''internally''': all your getters and everything that could be 
called by <code>__get()</code> must use the real accessors instead of 
<code>__get()</code> / <code>__set()</code> magic. I guess this just kind of 
seemed like an obvious good idea to me, so I never ran into this bug.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to