r23435 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23434‎ | r23435 | r23436 >
Date:21:03, 26 June 2007
Author:robchurch
Status:old
Tags:
Comment:
Some updates; regarding method/member visibilities, OutputPage is not Parser, and Language objects
Modified paths:
  • /trunk/phase3/docs/design.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/design.txt
@@ -34,8 +34,7 @@
3535 calling output() to send it all. It could be easily changed
3636 to send incrementally if that becomes useful, but I prefer
3737 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.
4039
4140 Title
4241 Represents the title of an article, and does all the work
@@ -69,7 +68,9 @@
7069 Language
7170 Represents the language used for incidental text, and also
7271 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.
7475
7576 LinkCache
7677 Keeps information on existence of articles. See LINKCACHE.TXT.
@@ -94,13 +95,14 @@
9596 its own line or the statement that opened the block--that's
9697 confusing as hell.
9798
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.
105107
106108 - Member variables are generally "mXxx" to distinguish them.
107109 This should make it easier to spot errors of forgetting the
@@ -123,5 +125,4 @@
124126
125127 Other conventions: Top-level functions are wfFuncname(), names
126128 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

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log