519b4161aa74cfd8e443f09194c95b57fef5adcf
[lhc/web/wiklou.git] / docs / globals.txt
1 globals.txt
2
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.
12
13 $wgOut
14 OutputPage object for HTTP response.
15
16 $wgTitle
17 Title object created from the request URL.
18
19 $wgLang
20 Language object for this request.
21
22 $wgArticle
23 Article object corresponsing to $wgTitle.
24
25 $wgLinkCache
26 LinkCache object.
27
28 ...
29