User "Happy-melon" posted a comment on MediaWiki.r85288.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/85288#c17432
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 don't think anything's actually ''wrong'' with that code in terms of variable 
access/visibility/whatever.  The magic methods just add an exotic twist to 
working out what the best naming convention is...

I'm actually not so sure about this approach any more; in r86872 I wanted to 
make RequestContext itself an IContextSource, and not being able to do so 
offended my sense of recursion...  <tt>:D</tt>  Plus it's not so good for type 
hinting.  I think just abstracting this away by reimplementing r86872 would be 
preferable.  

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

Reply via email to