* Fix WebRequest::getRequestURL() to strip off the host bits squid prepends
[mediawiki.git] / docs / globals.txt
blob519b4161aa74cfd8e443f09194c95b57fef5adcf
1 globals.txt
3 PHP loves globals. I hate them. This is not a great
4 combination, but I manage. I could get rid of most of
5 them by having a single "HTTP request" object, and using
6 it to hold everything that's now global (which is exactly
7 what I'd do in a Java servlet). But that's really
8 awkward in PHP, and wouldn't really provide much benefit
9 in readability or maintainability, so I go with the flow
10 of PHP and use globals.  Here's documentation on the
11 important globals used by the system.
13 $wgOut
14         OutputPage object for HTTP response.
16 $wgTitle
17         Title object created from the request URL.
19 $wgLang
20         Language object for this request.
22 $wgArticle
23         Article object corresponsing to $wgTitle.
25 $wgLinkCache
26         LinkCache object.
28 ...