Index: trunk/phase3/docs/design.txt |
— | — | @@ -34,8 +34,7 @@ |
35 | 35 | calling output() to send it all. It could be easily changed |
36 | 36 | to send incrementally if that becomes useful, but I prefer |
37 | 37 | the flexibility. This should also do the output encoding. |
38 | | - The system allocates a global one in $wgOut. This class |
39 | | - also handles converting wikitext format to HTML. |
| 38 | + The system allocates a global one in $wgOut. |
40 | 39 | |
41 | 40 | Title |
42 | 41 | Represents the title of an article, and does all the work |
— | — | @@ -69,7 +68,9 @@ |
70 | 69 | Language |
71 | 70 | Represents the language used for incidental text, and also |
72 | 71 | has some character encoding functions and other locale stuff. |
73 | | - A global one is allocated in $wgLang. |
| 72 | + The current user interface language is instantiated as $wgLang, |
| 73 | + and the local content language as $wgContLang; be sure to use |
| 74 | + the *correct* language object depending upon the circumstances. |
74 | 75 | |
75 | 76 | LinkCache |
76 | 77 | Keeps information on existence of articles. See LINKCACHE.TXT. |
— | — | @@ -94,13 +95,14 @@ |
95 | 96 | its own line or the statement that opened the block--that's |
96 | 97 | confusing as hell. |
97 | 98 | |
98 | | - - PHP doesn't have "private" member variables of functions, |
99 | | - so I've used the comment "/* private */" in some places to |
100 | | - indicate my intent. Don't access things marked that way |
101 | | - from outside the class def--use the accessor functions (or |
102 | | - make your own if you need them). Yes, even some globals |
103 | | - are marked private, because PHP is broken and doesn't |
104 | | - allow static class variables. |
| 99 | + - Certain functions and class members are marked with |
| 100 | + /* private */, rather than being marked as such. This is a |
| 101 | + hold-over from PHP 4, which didn't support proper visibilities. |
| 102 | + You should not access things marked in this manner outside the |
| 103 | + class/inheritance line as this code is subjected to be updated |
| 104 | + in a manner that enforces this at some time in the near future, |
| 105 | + and things will break. New code should use the standard method of |
| 106 | + setting visibilities as normal. |
105 | 107 | |
106 | 108 | - Member variables are generally "mXxx" to distinguish them. |
107 | 109 | This should make it easier to spot errors of forgetting the |
— | — | @@ -123,5 +125,4 @@ |
124 | 126 | |
125 | 127 | Other conventions: Top-level functions are wfFuncname(), names |
126 | 128 | of session variables are wsName, cookies wcName, and form field |
127 | | - values wpName ("p" for "POST"). |
128 | | - |
| 129 | + values wpName ("p" for "POST"). |
\ No newline at end of file |