r39119 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39118‎ | r39119 | r39120 >
Date:04:39, 11 August 2008
Author:krimpet
Status:old
Tags:
Comment:
Updated Doxygen docs for Title.php
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/maintenance/Doxyfile (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -23,53 +23,50 @@
2424 define( 'CASCADE', 1 );
2525
2626 /**
27 - * Title class
28 - * - Represents a title, which may contain an interwiki designation or namespace
29 - * - Can fetch various kinds of data from the database, albeit inefficiently.
30 - *
 27+ * Represents a title within MediaWiki.
 28+ * Optionally may contain an interwiki designation or namespace.
 29+ * @note This class can fetch various kinds of data from the database;
 30+ * however, it does so inefficiently.
3131 */
3232 class Title {
33 - /**
34 - * Static cache variables
35 - */
 33+ /** @name Static cache variables */
 34+ //@{
3635 static private $titleCache=array();
3736 static private $interwikiCache=array();
 37+ //@}
3838
39 -
4039 /**
41 - * All member variables should be considered private
42 - * Please use the accessor functions
43 - */
44 -
45 - /**#@+
 40+ * @name Private member variables
 41+ * Please use the accessor functions instead.
4642 * @private
4743 */
 44+ //@{
4845
49 - var $mTextform = ''; # Text form (spaces not underscores) of the main part
50 - var $mUrlform = ''; # URL-encoded form of the main part
51 - var $mDbkeyform = ''; # Main part with underscores
52 - var $mUserCaseDBKey; # DB key with the initial letter in the case specified by the user
53 - var $mNamespace = NS_MAIN; # Namespace index, i.e. one of the NS_xxxx constants
54 - var $mInterwiki = ''; # Interwiki prefix (or null string)
55 - var $mFragment; # Title fragment (i.e. the bit after the #)
56 - var $mArticleID = -1; # Article ID, fetched from the link cache on demand
57 - var $mLatestID = false; # ID of most recent revision
58 - var $mRestrictions = array(); # Array of groups allowed to edit this article
 46+ var $mTextform = ''; ///< Text form (spaces not underscores) of the main part
 47+ var $mUrlform = ''; ///< URL-encoded form of the main part
 48+ var $mDbkeyform = ''; ///< Main part with underscores
 49+ var $mUserCaseDBKey; ///< DB key with the initial letter in the case specified by the user
 50+ var $mNamespace = NS_MAIN; ///< Namespace index, i.e. one of the NS_xxxx constants
 51+ var $mInterwiki = ''; ///< Interwiki prefix (or null string)
 52+ var $mFragment; ///< Title fragment (i.e. the bit after the #)
 53+ var $mArticleID = -1; ///< Article ID, fetched from the link cache on demand
 54+ var $mLatestID = false; ///< ID of most recent revision
 55+ var $mRestrictions = array(); ///< Array of groups allowed to edit this article
5956 var $mOldRestrictions = false;
60 - var $mCascadeRestriction; # Cascade restrictions on this page to included templates and images?
61 - var $mRestrictionsExpiry; # When do the restrictions on this page expire?
62 - var $mHasCascadingRestrictions; # Are cascading restrictions in effect on this page?
63 - var $mCascadeRestrictionSources; # Where are the cascading restrictions coming from on this page?
64 - var $mRestrictionsLoaded = false; # Boolean for initialisation on demand
65 - var $mPrefixedText; # Text form including namespace/interwiki, initialised on demand
 57+ var $mCascadeRestriction; ///< Cascade restrictions on this page to included templates and images?
 58+ var $mRestrictionsExpiry; ///< When do the restrictions on this page expire?
 59+ var $mHasCascadingRestrictions; ///< Are cascading restrictions in effect on this page?
 60+ var $mCascadeRestrictionSources; ///< Where are the cascading restrictions coming from on this page?
 61+ var $mRestrictionsLoaded = false; ///< Boolean for initialisation on demand
 62+ var $mPrefixedText; ///< Text form including namespace/interwiki, initialised on demand
6663 # Don't change the following default, NS_MAIN is hardcoded in several
6764 # places. See bug 696.
68 - var $mDefaultNamespace = NS_MAIN; # Namespace index when there is no namespace
69 - # Zero except in {{transclusion}} tags
70 - var $mWatched = null; # Is $wgUser watching this page? null if unfilled, accessed through userIsWatching()
71 - var $mLength = -1; # The page length, 0 for special pages
72 - var $mRedirect = null; # Is the article at this title a redirect?
73 - /**#@-*/
 65+ var $mDefaultNamespace = NS_MAIN; ///< Namespace index when there is no namespace
 66+ # Zero except in {{transclusion}} tags
 67+ var $mWatched = null; ///< Is $wgUser watching this page? null if unfilled, accessed through userIsWatching()
 68+ var $mLength = -1; ///< The page length, 0 for special pages
 69+ var $mRedirect = null; ///< Is the article at this title a redirect?
 70+ //@}
7471
7572
7673 /**
@@ -80,10 +77,10 @@
8178
8279 /**
8380 * Create a new Title from a prefixed DB key
84 - * @param string $key The database key, which has underscores
 81+ * @param $key \type{\string} The database key, which has underscores
8582 * instead of spaces, possibly including namespace and
8683 * interwiki prefixes
87 - * @return Title the new object, or NULL on an error
 84+ * @return \type{Title} the new object, or NULL on an error
8885 */
8986 public static function newFromDBkey( $key ) {
9087 $t = new Title();
@@ -98,12 +95,12 @@
9996 * Create a new Title from text, such as what one would
10097 * find in a link. Decodes any HTML entities in the text.
10198 *
102 - * @param string $text the link text; spaces, prefixes,
 99+ * @param $text \type{\string} the link text; spaces, prefixes,
103100 * and an initial ':' indicating the main namespace
104101 * are accepted
105 - * @param int $defaultNamespace the namespace to use if
 102+ * @param $defaultNamespace \type{\int} the namespace to use if
106103 * none is specified by a prefix
107 - * @return Title the new object, or NULL on an error
 104+ * @return \type{Title} the new object, or NULL on an error
108105 */
109106 public static function newFromText( $text, $defaultNamespace = NS_MAIN ) {
110107 if( is_object( $text ) ) {
@@ -152,8 +149,8 @@
153150 /**
154151 * Create a new Title from URL-encoded text. Ensures that
155152 * the given title's length does not exceed the maximum.
156 - * @param string $url the title, as might be taken from a URL
157 - * @return Title the new object, or NULL on an error
 153+ * @param $url \type{\string} the title, as might be taken from a URL
 154+ * @return \type{Title} the new object, or NULL on an error
158155 */
159156 public static function newFromURL( $url ) {
160157 global $wgLegalTitleChars;
@@ -180,9 +177,9 @@
181178 * @todo This is inefficiently implemented, the page row is requested
182179 * but not used for anything else
183180 *
184 - * @param int $id the page_id corresponding to the Title to create
185 - * @param int $flags, use GAID_FOR_UPDATE to use master
186 - * @return Title the new object, or NULL on an error
 181+ * @param $id \type{\int} the page_id corresponding to the Title to create
 182+ * @param $flags \type{\int} use GAID_FOR_UPDATE to use master
 183+ * @return \type{Title} the new object, or NULL on an error
187184 */
188185 public static function newFromID( $id, $flags = 0 ) {
189186 $fname = 'Title::newFromID';
@@ -199,6 +196,8 @@
200197
201198 /**
202199 * Make an array of titles from an array of IDs
 200+ * @param $ids \arrayof{\int} Array of IDs
 201+ * @return \arrayof{Title} Array of Titles
203202 */
204203 public static function newFromIDs( $ids ) {
205204 if ( !count( $ids ) ) {
@@ -217,7 +216,8 @@
218217
219218 /**
220219 * Make a Title object from a DB row
221 - * @param Row $row (needs at least page_title,page_namespace)
 220+ * @param $row \type{Row} (needs at least page_title,page_namespace)
 221+ * @return \type{Title} corresponding Title
222222 */
223223 public static function newFromRow( $row ) {
224224 $t = self::makeTitle( $row->page_namespace, $row->page_title );
@@ -237,10 +237,10 @@
238238 * For convenience, spaces are converted to underscores so that
239239 * eg user_text fields can be used directly.
240240 *
241 - * @param int $ns the namespace of the article
242 - * @param string $title the unprefixed database key form
243 - * @param string $fragment The link fragment (after the "#")
244 - * @return Title the new object
 241+ * @param $ns \type{\int} the namespace of the article
 242+ * @param $title \type{\string} the unprefixed database key form
 243+ * @param $fragment \type{\string} The link fragment (after the "#")
 244+ * @return \type{Title} the new object
245245 */
246246 public static function &makeTitle( $ns, $title, $fragment = '' ) {
247247 $t = new Title();
@@ -259,10 +259,10 @@
260260 * The parameters will be checked for validity, which is a bit slower
261261 * than makeTitle() but safer for user-provided data.
262262 *
263 - * @param int $ns the namespace of the article
264 - * @param string $title the database key form
265 - * @param string $fragment The link fragment (after the "#")
266 - * @return Title the new object, or NULL on an error
 263+ * @param $ns \type{\int} the namespace of the article
 264+ * @param $title \type{\string} the database key form
 265+ * @param $fragment \type{\string} The link fragment (after the "#")
 266+ * @return \type{Title} the new object, or NULL on an error
267267 */
268268 public static function makeTitleSafe( $ns, $title, $fragment = '' ) {
269269 $t = new Title();
@@ -276,7 +276,7 @@
277277
278278 /**
279279 * Create a new Title for the Main Page
280 - * @return Title the new object
 280+ * @return \type{Title} the new object
281281 */
282282 public static function newMainPage() {
283283 $title = Title::newFromText( wfMsgForContent( 'mainpage' ) );
@@ -291,8 +291,8 @@
292292 * Extract a redirect destination from a string and return the
293293 * Title, or null if the text doesn't contain a valid redirect
294294 *
295 - * @param string $text Text with possible redirect
296 - * @return Title
 295+ * @param $text \type{String} Text with possible redirect
 296+ * @return \type{Title} The corresponding Title
297297 */
298298 public static function newFromRedirect( $text ) {
299299 $redir = MagicWord::get( 'redirect' );
@@ -326,8 +326,8 @@
327327
328328 /**
329329 * Get the prefixed DB key associated with an ID
330 - * @param int $id the page_id of the article
331 - * @return Title an object representing the article, or NULL
 330+ * @param $id \type{\int} the page_id of the article
 331+ * @return \type{Title} an object representing the article, or NULL
332332 * if no such article was found
333333 */
334334 public static function nameOf( $id ) {
@@ -342,7 +342,7 @@
343343
344344 /**
345345 * Get a regex character class describing the legal characters in a link
346 - * @return string the list of characters, not delimited
 346+ * @return \type{\string} the list of characters, not delimited
347347 */
348348 public static function legalChars() {
349349 global $wgLegalTitleChars;
@@ -353,9 +353,9 @@
354354 * Get a string representation of a title suitable for
355355 * including in a search index
356356 *
357 - * @param int $ns a namespace index
358 - * @param string $title text-form main part
359 - * @return string a stripped-down title string ready for the
 357+ * @param $ns \type{\int} a namespace index
 358+ * @param $title \type{\string} text-form main part
 359+ * @return \type{\string} a stripped-down title string ready for the
360360 * search index
361361 */
362362 public static function indexTitle( $ns, $title ) {
@@ -380,10 +380,10 @@
381381
382382 /*
383383 * Make a prefixed DB key from a DB key and a namespace index
384 - * @param int $ns numerical representation of the namespace
385 - * @param string $title the DB key form the title
386 - * @param string $fragment The link fragment (after the "#")
387 - * @return string the prefixed form of the title
 384+ * @param $ns \type{\int} numerical representation of the namespace
 385+ * @param $title \type{\string} the DB key form the title
 386+ * @param $fragment \type{\string} The link fragment (after the "#")
 387+ * @return \type{\string} the prefixed form of the title
388388 */
389389 public static function makeName( $ns, $title, $fragment = '' ) {
390390 global $wgContLang;
@@ -398,9 +398,9 @@
399399
400400 /**
401401 * Returns the URL associated with an interwiki prefix
402 - * @param string $key the interwiki prefix (e.g. "MeatBall")
403 - * @return the associated URL, containing "$1", which should be
404 - * replaced by an article title
 402+ * @param $key \type{\string} the interwiki prefix (e.g. "MeatBall")
 403+ * @return \type{\string} the associated URL, containing "$1",
 404+ * which should be replaced by an article title
405405 * @static (arguably)
406406 */
407407 public function getInterwikiLink( $key ) {
@@ -449,11 +449,12 @@
450450 }
451451
452452 /**
453 - * Fetch interwiki prefix data from local cache in constant database
 453+ * Fetch interwiki prefix data from local cache in constant database.
454454 *
455 - * More logic is explained in DefaultSettings
 455+ * @note More logic is explained in DefaultSettings.
456456 *
457 - * @return string URL of interwiki site
 457+ * @param $key \type{\string} Database key
 458+ * @return \type{\string} URL of interwiki site
458459 */
459460 public static function getInterwikiCached( $key ) {
460461 global $wgInterwikiCache, $wgInterwikiScopes, $wgInterwikiFallbackSite;
@@ -490,11 +491,12 @@
491492 Title::$interwikiCache[wfMemcKey( 'interwiki', $key )] = $s;
492493 return $s->iw_url;
493494 }
 495+
494496 /**
495497 * Determine whether the object refers to a page within
496498 * this project.
497499 *
498 - * @return bool TRUE if this is an in-project interwiki link
 500+ * @return \type{\bool} TRUE if this is an in-project interwiki link
499501 * or a wikilink, FALSE otherwise
500502 */
501503 public function isLocal() {
@@ -512,7 +514,7 @@
513515 * Determine whether the object refers to a page within
514516 * this project and is transcludable.
515517 *
516 - * @return bool TRUE if this is transcludable
 518+ * @return \type{\bool} TRUE if this is transcludable
517519 */
518520 public function isTrans() {
519521 if ($this->mInterwiki == '')
@@ -543,27 +545,27 @@
544546 /** Simple accessors */
545547 /**
546548 * Get the text form (spaces not underscores) of the main part
547 - * @return string
 549+ * @return \type{\string} Main part of the title
548550 */
549551 public function getText() { return $this->mTextform; }
550552 /**
551553 * Get the URL-encoded form of the main part
552 - * @return string
 554+ * @return \type{\string} Main part of the title, URL-encoded
553555 */
554556 public function getPartialURL() { return $this->mUrlform; }
555557 /**
556558 * Get the main part with underscores
557 - * @return string
 559+ * @return \type{\string} Main part of the title, with underscores
558560 */
559561 public function getDBkey() { return $this->mDbkeyform; }
560562 /**
561 - * Get the namespace index, i.e. one of the NS_xxxx constants
562 - * @return int
 563+ * Get the namespace index, i.e.\ one of the NS_xxxx constants.
 564+ * @return \type{\int} Namespace index
563565 */
564566 public function getNamespace() { return $this->mNamespace; }
565567 /**
566568 * Get the namespace text
567 - * @return string
 569+ * @return \type{\string} Namespace text
568570 */
569571 public function getNsText() {
570572 global $wgContLang, $wgCanonicalNamespaceNames;
@@ -583,49 +585,47 @@
584586 }
585587 /**
586588 * Get the DB key with the initial letter case as specified by the user
 589+ * @return \type{\string} DB key
587590 */
588591 function getUserCaseDBKey() {
589592 return $this->mUserCaseDBKey;
590593 }
591594 /**
592595 * Get the namespace text of the subject (rather than talk) page
593 - * @return string
 596+ * @return \type{\string} Namespace text
594597 */
595598 public function getSubjectNsText() {
596599 global $wgContLang;
597600 return $wgContLang->getNsText( MWNamespace::getSubject( $this->mNamespace ) );
598601 }
599 -
600602 /**
601603 * Get the namespace text of the talk page
602 - * @return string
 604+ * @return \type{\string} Namespace text
603605 */
604606 public function getTalkNsText() {
605607 global $wgContLang;
606608 return( $wgContLang->getNsText( MWNamespace::getTalk( $this->mNamespace ) ) );
607609 }
608 -
609610 /**
610611 * Could this title have a corresponding talk page?
611 - * @return bool
 612+ * @return \type{\bool} TRUE or FALSE
612613 */
613614 public function canTalk() {
614615 return( MWNamespace::canTalk( $this->mNamespace ) );
615616 }
616 -
617617 /**
618618 * Get the interwiki prefix (or null string)
619 - * @return string
 619+ * @return \type{\string} Interwiki prefix
620620 */
621621 public function getInterwiki() { return $this->mInterwiki; }
622622 /**
623 - * Get the Title fragment (i.e. the bit after the #) in text form
624 - * @return string
 623+ * Get the Title fragment (i.e.\ the bit after the #) in text form
 624+ * @return \type{\string} Title fragment
625625 */
626626 public function getFragment() { return $this->mFragment; }
627627 /**
628628 * Get the fragment in URL form, including the "#" character if there is one
629 - * @return string
 629+ * @return \type{\string} Fragment in URL form
630630 */
631631 public function getFragmentForURL() {
632632 if ( $this->mFragment == '' ) {
@@ -636,13 +636,13 @@
637637 }
638638 /**
639639 * Get the default namespace index, for when there is no namespace
640 - * @return int
 640+ * @return \type{\int} Default namespace index
641641 */
642642 public function getDefaultNamespace() { return $this->mDefaultNamespace; }
643643
644644 /**
645645 * Get title for search index
646 - * @return string a stripped-down title string ready for the
 646+ * @return \type{\string} a stripped-down title string ready for the
647647 * search index
648648 */
649649 public function getIndexTitle() {
@@ -651,7 +651,7 @@
652652
653653 /**
654654 * Get the prefixed database key form
655 - * @return string the prefixed title, with underscores and
 655+ * @return \type{\string} the prefixed title, with underscores and
656656 * any interwiki and namespace prefixes
657657 */
658658 public function getPrefixedDBkey() {
@@ -663,7 +663,7 @@
664664 /**
665665 * Get the prefixed title with spaces.
666666 * This is the form usually used for display
667 - * @return string the prefixed title, with spaces
 667+ * @return \type{\string} the prefixed title, with spaces
668668 */
669669 public function getPrefixedText() {
670670 if ( empty( $this->mPrefixedText ) ) { // FIXME: bad usage of empty() ?
@@ -677,7 +677,7 @@
678678 /**
679679 * Get the prefixed title with spaces, plus any fragment
680680 * (part beginning with '#')
681 - * @return string the prefixed title, with spaces and
 681+ * @return \type{\string} the prefixed title, with spaces and
682682 * the fragment, including '#'
683683 */
684684 public function getFullText() {
@@ -690,7 +690,7 @@
691691
692692 /**
693693 * Get the base name, i.e. the leftmost parts before the /
694 - * @return string Base name
 694+ * @return \type{\string} Base name
695695 */
696696 public function getBaseText() {
697697 if( !MWNamespace::hasSubpages( $this->mNamespace ) ) {
@@ -706,7 +706,7 @@
707707
708708 /**
709709 * Get the lowest-level subpage name, i.e. the rightmost part after /
710 - * @return string Subpage name
 710+ * @return \type{\string} Subpage name
711711 */
712712 public function getSubpageText() {
713713 if( !MWNamespace::hasSubpages( $this->mNamespace ) ) {
@@ -718,7 +718,7 @@
719719
720720 /**
721721 * Get a URL-encoded form of the subpage text
722 - * @return string URL-encoded subpage name
 722+ * @return \type{\string} URL-encoded subpage name
723723 */
724724 public function getSubpageUrlForm() {
725725 $text = $this->getSubpageText();
@@ -729,7 +729,7 @@
730730
731731 /**
732732 * Get a URL-encoded title (not an actual URL) including interwiki
733 - * @return string the URL-encoded form
 733+ * @return \type{\string} the URL-encoded form
734734 */
735735 public function getPrefixedURL() {
736736 $s = $this->prefix( $this->mDbkeyform );
@@ -748,11 +748,11 @@
749749 * Get a real URL referring to this title, with interwiki link and
750750 * fragment
751751 *
752 - * @param array $query an optional query string, not used for interwiki
 752+ * @param $query \twotypes{\string,\array} an optional query string, not used for interwiki
753753 * links. Can be specified as an associative array as well, e.g.,
754754 * array( 'action' => 'edit' ) (keys and values will be URL-escaped).
755 - * @param string $variant language variant of url (for sr, zh..)
756 - * @return string the URL
 755+ * @param $variant \type{\string} language variant of url (for sr, zh..)
 756+ * @return \type{\string} the URL
757757 */
758758 public function getFullURL( $query = '', $variant = false ) {
759759 global $wgContLang, $wgServer, $wgRequest;
@@ -796,8 +796,8 @@
797797 * $wgArticlePath will be used. Can be specified as an associative array
798798 * as well, e.g., array( 'action' => 'edit' ) (keys and values will be
799799 * URL-escaped).
800 - * @param string $variant language variant of url (for sr, zh..)
801 - * @return string the URL
 800+ * @param $variant \type{\string} language variant of url (for sr, zh..)
 801+ * @return \type{\string} the URL
802802 */
803803 public function getLocalURL( $query = '', $variant = false ) {
804804 global $wgArticlePath, $wgScript, $wgServer, $wgRequest;
@@ -877,12 +877,12 @@
878878 * there's a fragment but the prefixed text is empty, we just return a link
879879 * to the fragment.
880880 *
881 - * @param array $query An associative array of key => value pairs for the
 881+ * @param $query \arrayof{\string} An associative array of key => value pairs for the
882882 * query string. Keys and values will be escaped.
883 - * @param string $variant Language variant of URL (for sr, zh..). Ignored
 883+ * @param $variant \type{\string} Language variant of URL (for sr, zh..). Ignored
884884 * for external links. Default is "false" (same variant as current page,
885885 * for anonymous users).
886 - * @return string the URL
 886+ * @return \type{\string} the URL
887887 */
888888 public function getLinkUrl( $query = array(), $variant = false ) {
889889 if( !is_array( $query ) ) {
@@ -903,8 +903,8 @@
904904 /**
905905 * Get an HTML-escaped version of the URL form, suitable for
906906 * using in a link, without a server name or fragment
907 - * @param string $query an optional query string
908 - * @return string the URL
 907+ * @param $query \type{\string} an optional query string
 908+ * @return \type{\string} the URL
909909 */
910910 public function escapeLocalURL( $query = '' ) {
911911 return htmlspecialchars( $this->getLocalURL( $query ) );
@@ -914,8 +914,8 @@
915915 * Get an HTML-escaped version of the URL form, suitable for
916916 * using in a link, including the server name and fragment
917917 *
918 - * @return string the URL
919 - * @param string $query an optional query string
 918+ * @param $query \type{\string} an optional query string
 919+ * @return \type{\string} the URL
920920 */
921921 public function escapeFullURL( $query = '' ) {
922922 return htmlspecialchars( $this->getFullURL( $query ) );
@@ -926,9 +926,9 @@
927927 * - Used in various Squid-related code, in case we have a different
928928 * internal hostname for the server from the exposed one.
929929 *
930 - * @param string $query an optional query string
931 - * @param string $variant language variant of url (for sr, zh..)
932 - * @return string the URL
 930+ * @param $query \type{\string} an optional query string
 931+ * @param $variant \type{\string} language variant of url (for sr, zh..)
 932+ * @return \type{\string} the URL
933933 */
934934 public function getInternalURL( $query = '', $variant = false ) {
935935 global $wgInternalServer;
@@ -939,7 +939,7 @@
940940
941941 /**
942942 * Get the edit URL for this Title
943 - * @return string the URL, or a null string if this is an
 943+ * @return \type{\string} the URL, or a null string if this is an
944944 * interwiki link
945945 */
946946 public function getEditURL() {
@@ -952,7 +952,7 @@
953953 /**
954954 * Get the HTML-escaped displayable text form.
955955 * Used for the title field in <a> tags.
956 - * @return string the text, including any prefixes
 956+ * @return \type{\string} the text, including any prefixes
957957 */
958958 public function getEscapedText() {
959959 return htmlspecialchars( $this->getPrefixedText() );
@@ -960,15 +960,15 @@
961961
962962 /**
963963 * Is this Title interwiki?
964 - * @return boolean
 964+ * @return \type{\bool}
965965 */
966966 public function isExternal() { return ( '' != $this->mInterwiki ); }
967967
968968 /**
969969 * Is this page "semi-protected" - the *only* protection is autoconfirm?
970970 *
971 - * @param string Action to check (default: edit)
972 - * @return bool
 971+ * @param @action \type{\string} Action to check (default: edit)
 972+ * @return \type{\bool}
973973 */
974974 public function isSemiProtected( $action = 'edit' ) {
975975 if( $this->exists() ) {
@@ -991,9 +991,9 @@
992992
993993 /**
994994 * Does the title correspond to a protected article?
995 - * @param string $what the action the page is protected from,
 995+ * @param $what \type{\string} the action the page is protected from,
996996 * by default checks move and edit
997 - * @return boolean
 997+ * @return \type{\bool}
998998 */
999999 public function isProtected( $action = '' ) {
10001000 global $wgRestrictionLevels, $wgRestrictionTypes;
@@ -1019,7 +1019,7 @@
10201020
10211021 /**
10221022 * Is $wgUser watching this page?
1023 - * @return boolean
 1023+ * @return \type{\bool}
10241024 */
10251025 public function userIsWatching() {
10261026 global $wgUser;
@@ -1043,8 +1043,8 @@
10441044 *
10451045 * May provide false positives, but should never provide a false negative.
10461046 *
1047 - * @param string $action action that permission needs to be checked for
1048 - * @return boolean
 1047+ * @param $action \type{\string} action that permission needs to be checked for
 1048+ * @return \type{\bool}
10491049 */
10501050 public function quickUserCan( $action ) {
10511051 return $this->userCan( $action, false );
@@ -1054,7 +1054,7 @@
10551055 * Determines if $wgUser is unable to edit this page because it has been protected
10561056 * by $wgNamespaceProtection.
10571057 *
1058 - * @return boolean
 1058+ * @return \type{\bool}
10591059 */
10601060 public function isNamespaceProtected() {
10611061 global $wgNamespaceProtection, $wgUser;
@@ -1069,9 +1069,9 @@
10701070
10711071 /**
10721072 * Can $wgUser perform $action on this page?
1073 - * @param string $action action that permission needs to be checked for
1074 - * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary queries.
1075 - * @return boolean
 1073+ * @param \type{\string} $action action that permission needs to be checked for
 1074+ * @param $doExpensiveQueries \type{\bool} Set this to false to avoid doing unnecessary queries.
 1075+ * @return \type{\bool}
10761076 */
10771077 public function userCan( $action, $doExpensiveQueries = true ) {
10781078 global $wgUser;
@@ -1083,11 +1083,11 @@
10841084 *
10851085 * FIXME: This *does not* check throttles (User::pingLimiter()).
10861086 *
1087 - * @param string $action action that permission needs to be checked for
1088 - * @param User $user user to check
1089 - * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary queries.
1090 - * @param array $ignoreErrors Set this to a list of message keys whose corresponding errors may be ignored.
1091 - * @return array Array of arrays of the arguments to wfMsg to explain permissions problems.
 1087+ * @param $action \type{\string}action that permission needs to be checked for
 1088+ * @param $user \type{User} user to check
 1089+ * @param $doExpensiveQueries \type{\bool} Set this to false to avoid doing unnecessary queries.
 1090+ * @param $ignoreErrors \arrayof{\string} Set this to a list of message keys whose corresponding errors may be ignored.
 1091+ * @return \type{\array} Array of arrays of the arguments to wfMsg to explain permissions problems.
10921092 */
10931093 public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) {
10941094 if( !StubObject::isRealObject( $user ) ) {
@@ -1173,10 +1173,10 @@
11741174 * which checks ONLY that previously checked by userCan (i.e. it leaves out
11751175 * checks on wfReadOnly() and blocks)
11761176 *
1177 - * @param string $action action that permission needs to be checked for
1178 - * @param User $user user to check
1179 - * @param bool $doExpensiveQueries Set this to false to avoid doing unnecessary queries.
1180 - * @return array Array of arrays of the arguments to wfMsg to explain permissions problems.
 1177+ * @param $action \type{\string} action that permission needs to be checked for
 1178+ * @param $user \type{User} user to check
 1179+ * @param $doExpensiveQueries \type{\bool} Set this to false to avoid doing unnecessary queries.
 1180+ * @return \type{\array} Array of arrays of the arguments to wfMsg to explain permissions problems.
11811181 */
11821182 private function getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries = true ) {
11831183 wfProfileIn( __METHOD__ );
@@ -1330,7 +1330,7 @@
13311331
13321332 /**
13331333 * Is this title subject to title protection?
1334 - * @return mixed An associative array representing any existent title
 1334+ * @return \type{\mixed} An associative array representing any existent title
13351335 * protection, or false if there's none.
13361336 */
13371337 private function getTitleProtection() {
@@ -1350,6 +1350,12 @@
13511351 }
13521352 }
13531353
 1354+ /**
 1355+ * Update the title protection status
 1356+ * @param $create_perm \type{\string} Permission required for creation
 1357+ * @param $reason \type{\string} Reason for protection
 1358+ * @param $expiry \type{\string} Expiry timestamp
 1359+ */
13541360 public function updateTitleProtection( $create_perm, $reason, $expiry ) {
13551361 global $wgUser,$wgContLang;
13561362
@@ -1395,7 +1401,7 @@
13961402 }
13971403
13981404 /**
1399 - * Remove any title protection (due to page existing
 1405+ * Remove any title protection due to page existing
14001406 */
14011407 public function deleteTitleProtection() {
14021408 $dbw = wfGetDB( DB_MASTER );
@@ -1406,7 +1412,7 @@
14071413
14081414 /**
14091415 * Can $wgUser edit this page?
1410 - * @return boolean
 1416+ * @return \type{\bool} TRUE or FALSE
14111417 * @deprecated use userCan('edit')
14121418 */
14131419 public function userCanEdit( $doExpensiveQueries = true ) {
@@ -1415,7 +1421,7 @@
14161422
14171423 /**
14181424 * Can $wgUser create this page?
1419 - * @return boolean
 1425+ * @return \type{\bool} TRUE or FALSE
14201426 * @deprecated use userCan('create')
14211427 */
14221428 public function userCanCreate( $doExpensiveQueries = true ) {
@@ -1424,7 +1430,7 @@
14251431
14261432 /**
14271433 * Can $wgUser move this page?
1428 - * @return boolean
 1434+ * @return \type{\bool} TRUE or FALSE
14291435 * @deprecated use userCan('move')
14301436 */
14311437 public function userCanMove( $doExpensiveQueries = true ) {
@@ -1435,7 +1441,7 @@
14361442 * Would anybody with sufficient privileges be able to move this page?
14371443 * Some pages just aren't movable.
14381444 *
1439 - * @return boolean
 1445+ * @return \type{\bool} TRUE or FALSE
14401446 */
14411447 public function isMovable() {
14421448 return MWNamespace::isMovable( $this->getNamespace() )
@@ -1444,7 +1450,7 @@
14451451
14461452 /**
14471453 * Can $wgUser read this page?
1448 - * @return boolean
 1454+ * @return \type{\bool} TRUE or FALSE
14491455 * @todo fold these checks into userCan()
14501456 */
14511457 public function userCanRead() {
@@ -1521,7 +1527,7 @@
15221528
15231529 /**
15241530 * Is this a talk page of some sort?
1525 - * @return bool
 1531+ * @return \type{\bool} TRUE or FALSE
15261532 */
15271533 public function isTalkPage() {
15281534 return MWNamespace::isTalk( $this->getNamespace() );
@@ -1529,7 +1535,7 @@
15301536
15311537 /**
15321538 * Is this a subpage?
1533 - * @return bool
 1539+ * @return \type{\bool} TRUE or FALSE
15341540 */
15351541 public function isSubpage() {
15361542 return MWNamespace::hasSubpages( $this->mNamespace )
@@ -1539,7 +1545,7 @@
15401546
15411547 /**
15421548 * Does this have subpages? (Warning, usually requires an extra DB query.)
1543 - * @return bool
 1549+ * @return \type{\bool} TRUE or FALSE
15441550 */
15451551 public function hasSubpages() {
15461552 if( !MWNamespace::hasSubpages( $this->mNamespace ) ) {
@@ -1567,7 +1573,7 @@
15681574 * Could this page contain custom CSS or JavaScript, based
15691575 * on the title?
15701576 *
1571 - * @return bool
 1577+ * @return \type{\bool} TRUE or FALSE
15721578 */
15731579 public function isCssOrJsPage() {
15741580 return $this->mNamespace == NS_MEDIAWIKI
@@ -1576,7 +1582,7 @@
15771583
15781584 /**
15791585 * Is this a .css or .js subpage of a user page?
1580 - * @return bool
 1586+ * @return \type{\bool} TRUE or FALSE
15811587 */
15821588 public function isCssJsSubpage() {
15831589 return ( NS_USER == $this->mNamespace and preg_match("/\\/.*\\.(?:css|js)$/", $this->mTextform ) );
@@ -1584,6 +1590,7 @@
15851591 /**
15861592 * Is this a *valid* .css or .js subpage of a user page?
15871593 * Check that the corresponding skin exists
 1594+ * @return \type{\bool} TRUE or FALSE
15881595 */
15891596 public function isValidCssJsSubpage() {
15901597 if ( $this->isCssJsSubpage() ) {
@@ -1603,14 +1610,14 @@
16041611 }
16051612 /**
16061613 * Is this a .css subpage of a user page?
1607 - * @return bool
 1614+ * @return \type{\bool} TRUE or FALSE
16081615 */
16091616 public function isCssSubpage() {
16101617 return ( NS_USER == $this->mNamespace && preg_match("/\\/.*\\.css$/", $this->mTextform ) );
16111618 }
16121619 /**
16131620 * Is this a .js subpage of a user page?
1614 - * @return bool
 1621+ * @return \type{\bool} TRUE or FALSE
16151622 */
16161623 public function isJsSubpage() {
16171624 return ( NS_USER == $this->mNamespace && preg_match("/\\/.*\\.js$/", $this->mTextform ) );
@@ -1619,7 +1626,7 @@
16201627 * Protect css/js subpages of user pages: can $wgUser edit
16211628 * this page?
16221629 *
1623 - * @return boolean
 1630+ * @return \type{\bool} TRUE or FALSE
16241631 * @todo XXX: this might be better using restrictions
16251632 */
16261633 public function userCanEditCssJsSubpage() {
@@ -1630,7 +1637,7 @@
16311638 /**
16321639 * Cascading protection: Return true if cascading restrictions apply to this page, false if not.
16331640 *
1634 - * @return bool If the page is subject to cascading restrictions.
 1641+ * @return \type{\bool} If the page is subject to cascading restrictions.
16351642 */
16361643 public function isCascadeProtected() {
16371644 list( $sources, /* $restrictions */ ) = $this->getCascadeProtectionSources( false );
@@ -1640,10 +1647,10 @@
16411648 /**
16421649 * Cascading protection: Get the source of any cascading restrictions on this page.
16431650 *
1644 - * @param $get_pages bool Whether or not to retrieve the actual pages that the restrictions have come from.
1645 - * @return array( mixed title array, restriction array)
1646 - * Array of the Title objects of the pages from which cascading restrictions have come, false for none, or true if such restrictions exist, but $get_pages was not set.
1647 - * The restriction array is an array of each type, each of which contains an array of unique groups
 1651+ * @param $get_pages \type{\bool} Whether or not to retrieve the actual pages that the restrictions have come from.
 1652+ * @return \arrayof{mixed title array, restriction array} Array of the Title objects of the pages from
 1653+ * which cascading restrictions have come, false for none, or true if such restrictions exist, but $get_pages was not set.
 1654+ * The restriction array is an array of each type, each of which contains an array of unique groups.
16481655 */
16491656 public function getCascadeProtectionSources( $get_pages = true ) {
16501657 global $wgRestrictionTypes;
@@ -1739,7 +1746,7 @@
17401747
17411748 /**
17421749 * Loads a string into mRestrictions array
1743 - * @param resource $res restrictions as an SQL result.
 1750+ * @param $res \type{Resource} restrictions as an SQL result.
17441751 */
17451752 private function loadRestrictionsFromRow( $res, $oldFashionedRestrictions = NULL ) {
17461753 global $wgRestrictionTypes;
@@ -1812,6 +1819,9 @@
18131820 $this->mRestrictionsLoaded = true;
18141821 }
18151822
 1823+ /**
 1824+ * Load restrictions from the page_restrictions table
 1825+ */
18161826 public function loadRestrictions( $oldFashionedRestrictions = NULL ) {
18171827 if( !$this->mRestrictionsLoaded ) {
18181828 if ($this->exists()) {
@@ -1862,8 +1872,8 @@
18631873 /**
18641874 * Accessor/initialisation for mRestrictions
18651875 *
1866 - * @param string $action action that permission needs to be checked for
1867 - * @return array the array of groups allowed to edit this article
 1876+ * @param $action \type{\string} action that permission needs to be checked for
 1877+ * @return \arrayof{\string} the array of groups allowed to edit this article
18681878 */
18691879 public function getRestrictions( $action ) {
18701880 if( !$this->mRestrictionsLoaded ) {
@@ -1876,7 +1886,7 @@
18771887
18781888 /**
18791889 * Is there a version of this page in the deletion archive?
1880 - * @return int the number of archived revisions
 1890+ * @return \type{\int} the number of archived revisions
18811891 */
18821892 public function isDeleted() {
18831893 $fname = 'Title::isDeleted';
@@ -1897,9 +1907,9 @@
18981908 /**
18991909 * Get the article ID for this Title from the link cache,
19001910 * adding it if necessary
1901 - * @param int $flags a bit field; may be GAID_FOR_UPDATE to select
 1911+ * @param $flags \type{\int} a bit field; may be GAID_FOR_UPDATE to select
19021912 * for update
1903 - * @return int the ID
 1913+ * @return \type{\int} the ID
19041914 */
19051915 public function getArticleID( $flags = 0 ) {
19061916 $linkCache = LinkCache::singleton();
@@ -1918,8 +1928,8 @@
19191929 /**
19201930 * Is this an article that is a redirect page?
19211931 * Uses link cache, adding it if necessary
1922 - * @param int $flags a bit field; may be GAID_FOR_UPDATE to select for update
1923 - * @return bool
 1932+ * @param $flags \type{\int} a bit field; may be GAID_FOR_UPDATE to select for update
 1933+ * @return \type{\bool}
19241934 */
19251935 public function isRedirect( $flags = 0 ) {
19261936 if( !is_null($this->mRedirect) )
@@ -1938,8 +1948,8 @@
19391949 /**
19401950 * What is the length of this page?
19411951 * Uses link cache, adding it if necessary
1942 - * @param int $flags a bit field; may be GAID_FOR_UPDATE to select for update
1943 - * @return bool
 1952+ * @param $flags \type{\int} a bit field; may be GAID_FOR_UPDATE to select for update
 1953+ * @return \type{\bool}
19441954 */
19451955 public function getLength( $flags = 0 ) {
19461956 if( $this->mLength != -1 )
@@ -1957,8 +1967,8 @@
19581968
19591969 /**
19601970 * What is the page_latest field for this page?
1961 - * @param int $flags a bit field; may be GAID_FOR_UPDATE to select for update
1962 - * @return int
 1971+ * @param $flags \type{\int} a bit field; may be GAID_FOR_UPDATE to select for update
 1972+ * @return \type{\int}
19631973 */
19641974 public function getLatestRevID( $flags = 0 ) {
19651975 if ($this->mLatestID !== false)
@@ -1979,7 +1989,7 @@
19801990 * loading of the new page_id. It's also called from
19811991 * Article::doDeleteArticle()
19821992 *
1983 - * @param int $newid the new Article ID
 1993+ * @param $newid \type{\int} the new Article ID
19841994 */
19851995 public function resetArticleID( $newid ) {
19861996 $linkCache = LinkCache::singleton();
@@ -1993,7 +2003,7 @@
19942004
19952005 /**
19962006 * Updates page_touched for this page; called from LinksUpdate.php
1997 - * @return bool true if the update succeded
 2007+ * @return \type{\bool} true if the update succeded
19982008 */
19992009 public function invalidateCache() {
20002010 global $wgUseFileCache;
@@ -2024,8 +2034,8 @@
20252035 * Prefix some arbitrary text with the namespace or interwiki prefix
20262036 * of this object
20272037 *
2028 - * @param string $name the text
2029 - * @return string the prefixed text
 2038+ * @param $name \type{\string} the text
 2039+ * @return \type{\string} the prefixed text
20302040 * @private
20312041 */
20322042 /* private */ function prefix( $name ) {
@@ -2047,7 +2057,7 @@
20482058 * removes illegal characters, splits off the interwiki and
20492059 * namespace prefixes, sets the other forms, and canonicalizes
20502060 * everything.
2051 - * @return bool true on success
 2061+ * @return \type{\bool} true on success
20522062 */
20532063 private function secureAndSplit() {
20542064 global $wgContLang, $wgLocalInterwiki, $wgCapitalLinks;
@@ -2258,7 +2268,7 @@
22592269 * are immutable. The reason this is here is because it's better than setting the
22602270 * members directly, which is what Linker::formatComment was doing previously.
22612271 *
2262 - * @param string $fragment text
 2272+ * @param $fragment \type{\string} text
22632273 * @todo clarify whether access is supposed to be public (was marked as "kind of public")
22642274 */
22652275 public function setFragment( $fragment ) {
@@ -2267,7 +2277,7 @@
22682278
22692279 /**
22702280 * Get a Title object associated with the talk page of this article
2271 - * @return Title the object for the talk page
 2281+ * @return \type{Title} the object for the talk page
22722282 */
22732283 public function getTalkPage() {
22742284 return Title::makeTitle( MWNamespace::getTalk( $this->getNamespace() ), $this->getDBkey() );
@@ -2277,7 +2287,7 @@
22782288 * Get a title object associated with the subject page of this
22792289 * talk page
22802290 *
2281 - * @return Title the object for the subject page
 2291+ * @return \type{Title} the object for the subject page
22822292 */
22832293 public function getSubjectPage() {
22842294 return Title::makeTitle( MWNamespace::getSubject( $this->getNamespace() ), $this->getDBkey() );
@@ -2290,8 +2300,8 @@
22912301 * WARNING: do not use this function on arbitrary user-supplied titles!
22922302 * On heavily-used templates it will max out the memory.
22932303 *
2294 - * @param string $options may be FOR UPDATE
2295 - * @return array the Title objects linking here
 2304+ * @param $options \type{\string} may be FOR UPDATE
 2305+ * @return \arrayof{Title} the Title objects linking here
22962306 */
22972307 public function getLinksTo( $options = '', $table = 'pagelinks', $prefix = 'pl' ) {
22982308 $linkCache = LinkCache::singleton();
@@ -2331,8 +2341,8 @@
23322342 * WARNING: do not use this function on arbitrary user-supplied titles!
23332343 * On heavily-used templates it will max out the memory.
23342344 *
2335 - * @param string $options may be FOR UPDATE
2336 - * @return array the Title objects linking here
 2345+ * @param $options \type{\string} may be FOR UPDATE
 2346+ * @return \arrayof{Title} the Title objects linking here
23372347 */
23382348 public function getTemplateLinksTo( $options = '' ) {
23392349 return $this->getLinksTo( $options, 'templatelinks', 'tl' );
@@ -2342,8 +2352,8 @@
23432353 * Get an array of Title objects referring to non-existent articles linked from this page
23442354 *
23452355 * @todo check if needed (used only in SpecialBrokenRedirects.php, and should use redirect table in this case)
2346 - * @param string $options may be FOR UPDATE
2347 - * @return array the Title objects
 2356+ * @param $options \type{\string} may be FOR UPDATE
 2357+ * @return \arrayof{Title} the Title objects
23482358 */
23492359 public function getBrokenLinksFrom( $options = '' ) {
23502360 if ( $this->getArticleId() == 0 ) {
@@ -2386,7 +2396,7 @@
23872397 * Get a list of URLs to purge from the Squid cache when this
23882398 * page changes
23892399 *
2390 - * @return array the URLs
 2400+ * @return \arrayof{\string} the URLs
23912401 */
23922402 public function getSquidURLs() {
23932403 global $wgContLang;
@@ -2408,6 +2418,9 @@
24092419 return $urls;
24102420 }
24112421
 2422+ /**
 2423+ * Purge all applicable Squid URLs
 2424+ */
24122425 public function purgeSquid() {
24132426 global $wgUseSquid;
24142427 if ( $wgUseSquid ) {
@@ -2419,7 +2432,7 @@
24202433
24212434 /**
24222435 * Move this page without authentication
2423 - * @param Title &$nt the new page Title
 2436+ * @param &$nt \type{Title} the new page Title
24242437 */
24252438 public function moveNoAuth( &$nt ) {
24262439 return $this->moveTo( $nt, false );
@@ -2428,11 +2441,11 @@
24292442 /**
24302443 * Check whether a given move operation would be valid.
24312444 * Returns true if ok, or a getUserPermissionsErrors()-like array otherwise
2432 - * @param Title &$nt the new title
2433 - * @param bool $auth indicates whether $wgUser's permissions
 2445+ * @param &$nt \type{Title} the new title
 2446+ * @param $auth \type{\bool} indicates whether $wgUser's permissions
24342447 * should be checked
2435 - * @param string $reason is the log summary of the move, used for spam checking
2436 - * @return mixed True on success, getUserPermissionsErrors()-like array on failure
 2448+ * @param $reason \type{\string} is the log summary of the move, used for spam checking
 2449+ * @return \type{\mixed} True on success, getUserPermissionsErrors()-like array on failure
24372450 */
24382451 public function isValidMoveOperation( &$nt, $auth = true, $reason = '' ) {
24392452 $errors = array();
@@ -2513,13 +2526,13 @@
25142527
25152528 /**
25162529 * Move a title to a new location
2517 - * @param Title &$nt the new title
2518 - * @param bool $auth indicates whether $wgUser's permissions
 2530+ * @param &$nt \type{Title} the new title
 2531+ * @param $auth \type{\bool} indicates whether $wgUser's permissions
25192532 * should be checked
2520 - * @param string $reason The reason for the move
2521 - * @param bool $createRedirect Whether to create a redirect from the old title to the new title.
 2533+ * @param $reason \type{\string} The reason for the move
 2534+ * @param $createRedirect \type{\bool} Whether to create a redirect from the old title to the new title.
25222535 * Ignored if the user doesn't have the suppressredirect right.
2523 - * @return mixed true on success, getUserPermissionsErrors()-like array on failure
 2536+ * @return \type{\mixed} true on success, getUserPermissionsErrors()-like array on failure
25242537 */
25252538 public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true ) {
25262539 $err = $this->isValidMoveOperation( $nt, $auth, $reason );
@@ -2615,10 +2628,10 @@
26162629 * Move page to a title which is at present a redirect to the
26172630 * source page
26182631 *
2619 - * @param Title &$nt the page to move to, which should currently
 2632+ * @param &$nt \type{Title} the page to move to, which should currently
26202633 * be a redirect
2621 - * @param string $reason The reason for the move
2622 - * @param bool $createRedirect Whether to leave a redirect at the old title.
 2634+ * @param $reason \type{\string} The reason for the move
 2635+ * @param $createRedirect \type{\bool} Whether to leave a redirect at the old title.
26232636 * Ignored if the user doesn't have the suppressredirect right
26242637 */
26252638 private function moveOverExistingRedirect( &$nt, $reason = '', $createRedirect = true ) {
@@ -2733,9 +2746,9 @@
27342747
27352748 /**
27362749 * Move page to non-existing title.
2737 - * @param Title &$nt the new Title
2738 - * @param string $reason The reason for the move
2739 - * @param bool $createRedirect Whether to create a redirect from the old title to the new title
 2750+ * @param &$nt \type{Title} the new Title
 2751+ * @param $reason \type{\string} The reason for the move
 2752+ * @param $createRedirect \type{\bool} Whether to create a redirect from the old title to the new title
27402753 * Ignored if the user doesn't have the suppressredirect right
27412754 */
27422755 private function moveToNewTitle( &$nt, $reason = '', $createRedirect = true ) {
@@ -2830,7 +2843,8 @@
28312844 * Checks if $this can be moved to a given Title
28322845 * - Selects for update, so don't call it unless you mean business
28332846 *
2834 - * @param Title &$nt the new title to check
 2847+ * @param &$nt \type{Title} the new title to check
 2848+ * @return \type{\bool} TRUE or FALSE
28352849 */
28362850 public function isValidMoveTarget( $nt ) {
28372851
@@ -2893,7 +2907,7 @@
28942908 /**
28952909 * Can this title be added to a user's watchlist?
28962910 *
2897 - * @return bool
 2911+ * @return \type{\bool} TRUE or FALSE
28982912 */
28992913 public function isWatchable() {
29002914 return !$this->isExternal()
@@ -2904,7 +2918,7 @@
29052919 * Get categories to which this Title belongs and return an array of
29062920 * categories' names.
29072921 *
2908 - * @return array an array of parents in the form:
 2922+ * @return \type{\array} array an array of parents in the form:
29092923 * $parent => $currentarticle
29102924 */
29112925 public function getParentCategories() {
@@ -2935,8 +2949,8 @@
29362950
29372951 /**
29382952 * Get a tree of parent categories
2939 - * @param array $children an array with the children in the keys, to check for circular refs
2940 - * @return array
 2953+ * @param $children \type{\array} an array with the children in the keys, to check for circular refs
 2954+ * @return \type{\array} Tree of parent categories
29412955 */
29422956 public function getParentCategoryTree( $children = array() ) {
29432957 $stack = array();
@@ -2965,7 +2979,7 @@
29662980 * Get an associative array for selecting this title from
29672981 * the "page" table
29682982 *
2969 - * @return array
 2983+ * @return \type{\array} Selection array
29702984 */
29712985 public function pageCond() {
29722986 return array( 'page_namespace' => $this->mNamespace, 'page_title' => $this->mDbkeyform );
@@ -2974,9 +2988,9 @@
29752989 /**
29762990 * Get the revision ID of the previous revision
29772991 *
2978 - * @param integer $revId Revision ID. Get the revision that was before this one.
2979 - * @param integer $flags, GAID_FOR_UPDATE
2980 - * @return integer $oldrevision|false
 2992+ * @param $revId \type{\int} Revision ID. Get the revision that was before this one.
 2993+ * @param $flags \type{\int} GAID_FOR_UPDATE
 2994+ * @return \twotypes{\int,\bool} Old revision ID, or FALSE if none exists
29812995 */
29822996 public function getPreviousRevisionID( $revId, $flags=0 ) {
29832997 $db = ($flags & GAID_FOR_UPDATE) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
@@ -2993,9 +3007,9 @@
29943008 /**
29953009 * Get the revision ID of the next revision
29963010 *
2997 - * @param integer $revId Revision ID. Get the revision that was after this one.
2998 - * @param integer $flags, GAID_FOR_UPDATE
2999 - * @return integer $oldrevision|false
 3011+ * @param $revId \type{\int} Revision ID. Get the revision that was after this one.
 3012+ * @param $flags \type{\int} GAID_FOR_UPDATE
 3013+ * @return \twotypes{\int,\bool} Next revision ID, or FALSE if none exists
30003014 */
30013015 public function getNextRevisionID( $revId, $flags=0 ) {
30023016 $db = ($flags & GAID_FOR_UPDATE) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
@@ -3013,9 +3027,9 @@
30143028 * Get the number of revisions between the given revision IDs.
30153029 * Used for diffs and other things that really need it.
30163030 *
3017 - * @param integer $old Revision ID.
3018 - * @param integer $new Revision ID.
3019 - * @return integer Number of revisions between these IDs.
 3031+ * @param $old \type{\int} Revision ID.
 3032+ * @param $new \type{\int} Revision ID.
 3033+ * @return \type{\int} Number of revisions between these IDs.
30203034 */
30213035 public function countRevisionsBetween( $old, $new ) {
30223036 $dbr = wfGetDB( DB_SLAVE );
@@ -3030,8 +3044,8 @@
30313045 /**
30323046 * Compare with another title.
30333047 *
3034 - * @param Title $title
3035 - * @return bool
 3048+ * @param \type{Title} $title
 3049+ * @return \type{\bool} TRUE or FALSE
30363050 */
30373051 public function equals( Title $title ) {
30383052 // Note: === is necessary for proper matching of number-like titles.
@@ -3054,7 +3068,7 @@
30553069 /**
30563070 * Return a string representation of this title
30573071 *
3058 - * @return string
 3072+ * @return \type{\string} String representation of this title
30593073 */
30603074 public function __toString() {
30613075 return $this->getPrefixedText();
@@ -3062,7 +3076,7 @@
30633077
30643078 /**
30653079 * Check if page exists
3066 - * @return bool
 3080+ * @return \type{\bool} TRUE or FALSE
30673081 */
30683082 public function exists() {
30693083 return $this->getArticleId() != 0;
@@ -3072,7 +3086,7 @@
30733087 * Do we know that this title definitely exists, or should we otherwise
30743088 * consider that it exists?
30753089 *
3076 - * @return bool
 3090+ * @return \type{\bool} TRUE or FALSE
30773091 */
30783092 public function isAlwaysKnown() {
30793093 // If the page is form Mediawiki:message/lang, calling wfMsgWeirdKey causes
@@ -3103,6 +3117,7 @@
31043118
31053119 /**
31063120 * Get the last touched timestamp
 3121+ * @return \type{\string} Last touched timestamp
31073122 */
31083123 public function getTouched() {
31093124 $dbr = wfGetDB( DB_SLAVE );
@@ -3115,6 +3130,10 @@
31163131 return $touched;
31173132 }
31183133
 3134+ /**
 3135+ * Get the trackback URL for this page
 3136+ * @return \type{\string} Trackback URL
 3137+ */
31193138 public function trackbackURL() {
31203139 global $wgTitle, $wgScriptPath, $wgServer;
31213140
@@ -3122,6 +3141,10 @@
31233142 . htmlspecialchars(urlencode($wgTitle->getPrefixedDBkey()));
31243143 }
31253144
 3145+ /**
 3146+ * Get the trackback RDF for this page
 3147+ * @return \type{\string} Trackback RDF
 3148+ */
31263149 public function trackbackRDF() {
31273150 $url = htmlspecialchars($this->getFullURL());
31283151 $title = htmlspecialchars($this->getText());
@@ -3147,7 +3170,7 @@
31483171
31493172 /**
31503173 * Generate strings used for xml 'id' names in monobook tabs
3151 - * @return string
 3174+ * @return \type{\string} XML 'id' name
31523175 */
31533176 public function getNamespaceKey() {
31543177 global $wgContLang;
@@ -3187,7 +3210,7 @@
31883211
31893212 /**
31903213 * Returns true if this title resolves to the named special page
3191 - * @param string $name The special page name
 3214+ * @param $name \type{\string} The special page name
31923215 */
31933216 public function isSpecial( $name ) {
31943217 if ( $this->getNamespace() == NS_SPECIAL ) {
@@ -3201,7 +3224,7 @@
32023225
32033226 /**
32043227 * If the Title refers to a special page alias which is not the local default,
3205 - * returns a new Title which points to the local default. Otherwise, returns $this.
 3228+ * @return \type{Title} A new Title which points to the local default. Otherwise, returns $this.
32063229 */
32073230 public function fixSpecialName() {
32083231 if ( $this->getNamespace() == NS_SPECIAL ) {
@@ -3221,12 +3244,19 @@
32223245 * In other words, is this a content page, for the purposes of calculating
32233246 * statistics, etc?
32243247 *
3225 - * @return bool
 3248+ * @return \type{\bool} TRUE or FALSE
32263249 */
32273250 public function isContentPage() {
32283251 return MWNamespace::isContent( $this->getNamespace() );
32293252 }
32303253
 3254+ /**
 3255+ * Get all extant redirects to this Title
 3256+ *
 3257+ * @param $ns \twotypes{\int,\null} Single namespace to consider;
 3258+ * NULL to consider all namespaces
 3259+ * @return \arrayof{Title} Redirects to this title
 3260+ */
32313261 public function getRedirectsHere( $ns = null ) {
32323262 $redirs = array();
32333263
Index: trunk/phase3/maintenance/Doxyfile
@@ -16,7 +16,7 @@
1717 PROJECT_NAME = MediaWiki
1818 PROJECT_NUMBER = {{CURRENT_VERSION}}
1919 OUTPUT_DIRECTORY = {{OUTPUT_DIRECTORY}}
20 -CREATE_SUBDIRS = YES
 20+CREATE_SUBDIRS = NO
2121 OUTPUT_LANGUAGE = English
2222 BRIEF_MEMBER_DESC = YES
2323 REPEAT_BRIEF = YES
@@ -290,4 +290,5 @@
291291 "int=\integer" \
292292 "string=String" \
293293 "str=\string" \
 294+ "array=Array" \
294295 "mixed=Mixed"

Status & tagging log