Index: trunk/phase3/includes/resourceloader/ResourceLoaderSiteModule.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | /** |
32 | 32 | * Gets list of pages used by this module |
33 | 33 | * |
34 | | - * @return {array} List of pages |
| 34 | + * @return Array: List of pages |
35 | 35 | */ |
36 | 36 | protected function getPages( ResourceLoaderContext $context ) { |
37 | 37 | global $wgHandheldStyle; |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | /** |
58 | 58 | * Gets group name |
59 | 59 | * |
60 | | - * @return {string} Name of group |
| 60 | + * @return String: Name of group |
61 | 61 | */ |
62 | 62 | public function getGroup() { |
63 | 63 | return 'site'; |
Index: trunk/phase3/includes/resourceloader/ResourceLoader.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | |
32 | 32 | /* Protected Static Members */ |
33 | 33 | |
34 | | - /** @var {array} List of module name/ResourceLoaderModule object pairs */ |
| 34 | + /** Array: List of module name/ResourceLoaderModule object pairs */ |
35 | 35 | protected $modules = array(); |
36 | 36 | |
37 | 37 | /* Protected Methods */ |
— | — | @@ -46,8 +46,8 @@ |
47 | 47 | * requests its own information. This sacrifice of modularity yields a profound |
48 | 48 | * performance improvement. |
49 | 49 | * |
50 | | - * @param $modules Array: list of module names to preload information for |
51 | | - * @param $context ResourceLoaderContext: context to load the information within |
| 50 | + * @param $modules Array: List of module names to preload information for |
| 51 | + * @param $context ResourceLoaderContext: Context to load the information within |
52 | 52 | */ |
53 | 53 | protected function preloadModuleInfo( array $modules, ResourceLoaderContext $context ) { |
54 | 54 | if ( !count( $modules ) ) { |
— | — | @@ -114,9 +114,9 @@ |
115 | 115 | * If $data is empty, only contains whitespace or the filter was unknown, |
116 | 116 | * $data is returned unmodified. |
117 | 117 | * |
118 | | - * @param $filter String: name of filter to run |
119 | | - * @param $data String: text to filter, such as JavaScript or CSS text |
120 | | - * @return String: filtered data |
| 118 | + * @param $filter String: Name of filter to run |
| 119 | + * @param $data String: Text to filter, such as JavaScript or CSS text |
| 120 | + * @return String: Filtered data |
121 | 121 | */ |
122 | 122 | protected function filter( $filter, $data ) { |
123 | 123 | global $wgMemc; |
— | — | @@ -187,14 +187,13 @@ |
188 | 188 | /** |
189 | 189 | * Registers a module with the ResourceLoader system. |
190 | 190 | * |
191 | | - * @param $name Mixed: string of name of module or array of name/object pairs |
192 | | - * @param $object ResourceLoaderModule: module object (optional when using |
193 | | - * multiple-registration calling style) |
194 | | - * @throws MWException If a duplicate module registration is attempted |
195 | | - * @throws MWException If something other than a ResourceLoaderModule is being |
196 | | - * registered |
197 | | - * @return Boolean: false if there were any errors, in which case one or more |
198 | | - * modules were not registered |
| 191 | + * @param $name Mixed: Name of module as a string or List of name/object pairs as an array |
| 192 | + * @param $object ResourceLoaderModule: Module object (optional when using |
| 193 | + * multiple-registration calling style) |
| 194 | + * @throws MWException: If a duplicate module registration is attempted |
| 195 | + * @throws MWException: If something other than a ResourceLoaderModule is being registered |
| 196 | + * @return Boolean: False if there were any errors, in which case one or more modules were not |
| 197 | + * registered |
199 | 198 | */ |
200 | 199 | public function register( $name, ResourceLoaderModule $object = null ) { |
201 | 200 | |
— | — | @@ -236,7 +235,7 @@ |
237 | 236 | /** |
238 | 237 | * Gets a map of all modules and their options |
239 | 238 | * |
240 | | - * @return Array: array( modulename => ResourceLoaderModule ) |
| 239 | + * @return Array: List of modules keyed by module name |
241 | 240 | */ |
242 | 241 | public function getModules() { |
243 | 242 | return $this->modules; |
— | — | @@ -245,7 +244,7 @@ |
246 | 245 | /** |
247 | 246 | * Get the ResourceLoaderModule object for a given module name. |
248 | 247 | * |
249 | | - * @param $name String: module name |
| 248 | + * @param $name String: Module name |
250 | 249 | * @return Mixed: ResourceLoaderModule if module has been registered, null otherwise |
251 | 250 | */ |
252 | 251 | public function getModule( $name ) { |
— | — | @@ -255,7 +254,7 @@ |
256 | 255 | /** |
257 | 256 | * Outputs a response to a resource load-request, including a content-type header. |
258 | 257 | * |
259 | | - * @param $context ResourceLoaderContext: context in which a response should be formed |
| 258 | + * @param $context ResourceLoaderContext: Context in which a response should be formed |
260 | 259 | */ |
261 | 260 | public function respond( ResourceLoaderContext $context ) { |
262 | 261 | global $wgResourceLoaderMaxage, $wgCacheEpoch; |
— | — | @@ -345,10 +344,10 @@ |
346 | 345 | /** |
347 | 346 | * Generates code for a response |
348 | 347 | * |
349 | | - * @param $context ResourceLoaderContext: context in which to generate a response |
350 | | - * @param $modules Array: list of module objects keyed by module name |
351 | | - * @param $missing Array: list of unavailable modules (optional) |
352 | | - * @return String: response data |
| 348 | + * @param $context ResourceLoaderContext: Context in which to generate a response |
| 349 | + * @param $modules Array: List of module objects keyed by module name |
| 350 | + * @param $missing Array: List of unavailable modules (optional) |
| 351 | + * @return String: Response data |
353 | 352 | */ |
354 | 353 | public function makeModuleResponse( ResourceLoaderContext $context, |
355 | 354 | array $modules, $missing = array() ) |
— | — | @@ -447,12 +446,12 @@ |
448 | 447 | * given properties. |
449 | 448 | * |
450 | 449 | * @param $name Module name |
451 | | - * @param $scripts Array of JavaScript code snippets to be executed after the |
| 450 | + * @param $scripts Array: List of JavaScript code snippets to be executed after the |
452 | 451 | * module is loaded |
453 | | - * @param $styles Associative array mapping media type to associated CSS string |
454 | | - * @param $messages Messages associated with this module. May either be an |
455 | | - * associative array mapping message key to value, or a JSON-encoded message blob |
456 | | - * containing the same data, wrapped in an XmlJsCode object. |
| 452 | + * @param $styles Array: List of CSS strings keyed by media type |
| 453 | + * @param $messages Mixed: List of messages associated with this module. May either be an |
| 454 | + * associative array mapping message key to value, or a JSON-encoded message blob containing |
| 455 | + * the same data, wrapped in an XmlJsCode object. |
457 | 456 | */ |
458 | 457 | public static function makeLoaderImplementScript( $name, $scripts, $styles, $messages ) { |
459 | 458 | if ( is_array( $scripts ) ) { |
— | — | @@ -471,9 +470,8 @@ |
472 | 471 | /** |
473 | 472 | * Returns JS code which, when called, will register a given list of messages. |
474 | 473 | * |
475 | | - * @param $messages May either be an associative array mapping message key |
476 | | - * to value, or a JSON-encoded message blob containing the same data, |
477 | | - * wrapped in an XmlJsCode object. |
| 474 | + * @param $messages Mixed: Either an associative array mapping message key to value, or a |
| 475 | + * JSON-encoded message blob containing the same data, wrapped in an XmlJsCode object. |
478 | 476 | */ |
479 | 477 | public static function makeMessageSetScript( $messages ) { |
480 | 478 | return Xml::encodeJsCall( 'mediaWiki.messages.set', array( (object)$messages ) ); |
— | — | @@ -483,7 +481,7 @@ |
484 | 482 | * Combines an associative array mapping media type to CSS into a |
485 | 483 | * single stylesheet with @media blocks. |
486 | 484 | * |
487 | | - * @param $styles Array of CSS strings |
| 485 | + * @param $styles Array: List of CSS strings keyed by media type |
488 | 486 | */ |
489 | 487 | public static function makeCombinedStyles( array $styles ) { |
490 | 488 | $out = ''; |
— | — | @@ -517,11 +515,11 @@ |
518 | 516 | * which will have values corresponding to $name, $version, $dependencies |
519 | 517 | * and $group as supplied. |
520 | 518 | * |
521 | | - * @param $name The module name |
522 | | - * @param $version The module version string |
523 | | - * @param $dependencies Array of module names on which this module depends |
524 | | - * @param $group The group which the module is in. |
525 | | - * @param $script The JS loader script |
| 519 | + * @param $name String: Module name |
| 520 | + * @param $version Integer: Module version number as a timestamp |
| 521 | + * @param $dependencies Array: List of module names on which this module depends |
| 522 | + * @param $group String: Group which the module is in. |
| 523 | + * @param $script String: JavaScript code |
526 | 524 | */ |
527 | 525 | public static function makeCustomLoaderScript( $name, $version, $dependencies, $group, $script ) { |
528 | 526 | $script = str_replace( "\n", "\n\t", trim( $script ) ); |
— | — | @@ -547,10 +545,10 @@ |
548 | 546 | * ) ): |
549 | 547 | * Registers modules with the given names and parameters. |
550 | 548 | * |
551 | | - * @param $name The module name |
552 | | - * @param $version The module version string |
553 | | - * @param $dependencies Array of module names on which this module depends |
554 | | - * @param $group The group which the module is in. |
| 549 | + * @param $name String: Module name |
| 550 | + * @param $version Integer: Module version number as a timestamp |
| 551 | + * @param $dependencies Array: List of module names on which this module depends |
| 552 | + * @param $group String: group which the module is in. |
555 | 553 | */ |
556 | 554 | public static function makeLoaderRegisterScript( $name, $version = null, |
557 | 555 | $dependencies = null, $group = null ) |
— | — | @@ -568,7 +566,7 @@ |
569 | 567 | * Returns JS code which runs given JS code if the client-side framework is |
570 | 568 | * present. |
571 | 569 | * |
572 | | - * @param $script JS code to run |
| 570 | + * @param $script String: JavaScript code |
573 | 571 | */ |
574 | 572 | public static function makeLoaderConditionalScript( $script ) { |
575 | 573 | $script = str_replace( "\n", "\n\t", trim( $script ) ); |
— | — | @@ -579,7 +577,7 @@ |
580 | 578 | * Returns JS code which will set the MediaWiki configuration array to |
581 | 579 | * the given value. |
582 | 580 | * |
583 | | - * @param $configuration Associative array of configuration parameters |
| 581 | + * @param $configuration Array: List of configuration values keyed by variable name |
584 | 582 | */ |
585 | 583 | public static function makeConfigSetScript( array $configuration ) { |
586 | 584 | return Xml::encodeJsCall( 'mediaWiki.config.set', array( $configuration ) ); |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderUserOptionsModule.php |
— | — | @@ -50,8 +50,8 @@ |
51 | 51 | * Fetch the context's user options, or if it doesn't match current user, |
52 | 52 | * the default options. |
53 | 53 | * |
54 | | - * @param $context ResourceLoaderContext |
55 | | - * @return array |
| 54 | + * @param $context ResourceLoaderContext: Context object |
| 55 | + * @return Array: List of user options keyed by option name |
56 | 56 | */ |
57 | 57 | protected function contextUserOptions( ResourceLoaderContext $context ) { |
58 | 58 | global $wgUser; |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderFileModule.php |
— | — | @@ -27,67 +27,67 @@ |
28 | 28 | |
29 | 29 | /* Protected Members */ |
30 | 30 | |
31 | | - /** @var {string} Local base path, see __construct() */ |
| 31 | + /** String: Local base path, see __construct() */ |
32 | 32 | protected $localBasePath = ''; |
33 | | - /** @var {string} Remote base path, see __construct() */ |
| 33 | + /** String: Remote base path, see __construct() */ |
34 | 34 | protected $remoteBasePath = ''; |
35 | 35 | /** |
36 | | - * @var {array} List of paths to JavaScript files to always include |
37 | | - * @format array( [file-path], [file-path], ... ) |
| 36 | + * Array: List of paths to JavaScript files to always include |
| 37 | + * @example array( [file-path], [file-path], ... ) |
38 | 38 | */ |
39 | 39 | protected $scripts = array(); |
40 | 40 | /** |
41 | | - * @var {array} List of JavaScript files to include when using a specific language |
42 | | - * @format array( [language-code] => array( [file-path], [file-path], ... ), ... ) |
| 41 | + * Array: List of JavaScript files to include when using a specific language |
| 42 | + * @example array( [language-code] => array( [file-path], [file-path], ... ), ... ) |
43 | 43 | */ |
44 | 44 | protected $languageScripts = array(); |
45 | 45 | /** |
46 | | - * @var {array} List of JavaScript files to include when using a specific skin |
47 | | - * @format array( [skin-name] => array( [file-path], [file-path], ... ), ... ) |
| 46 | + * Array: List of JavaScript files to include when using a specific skin |
| 47 | + * @example array( [skin-name] => array( [file-path], [file-path], ... ), ... ) |
48 | 48 | */ |
49 | 49 | protected $skinScripts = array(); |
50 | 50 | /** |
51 | | - * @var {array} List of paths to JavaScript files to include in debug mode |
52 | | - * @format array( [skin-name] => array( [file-path], [file-path], ... ), ... ) |
| 51 | + * Array: List of paths to JavaScript files to include in debug mode |
| 52 | + * @example array( [skin-name] => array( [file-path], [file-path], ... ), ... ) |
53 | 53 | */ |
54 | 54 | protected $debugScripts = array(); |
55 | 55 | /** |
56 | | - * @var {array} List of paths to JavaScript files to include in the startup module |
57 | | - * @format array( [file-path], [file-path], ... ) |
| 56 | + * Array: List of paths to JavaScript files to include in the startup module |
| 57 | + * @example array( [file-path], [file-path], ... ) |
58 | 58 | */ |
59 | 59 | protected $loaderScripts = array(); |
60 | 60 | /** |
61 | | - * @var {array} List of paths to CSS files to always include |
62 | | - * @format array( [file-path], [file-path], ... ) |
| 61 | + * Array: List of paths to CSS files to always include |
| 62 | + * @example array( [file-path], [file-path], ... ) |
63 | 63 | */ |
64 | 64 | protected $styles = array(); |
65 | 65 | /** |
66 | | - * @var {array} List of paths to CSS files to include when using specific skins |
67 | | - * @format array( [file-path], [file-path], ... ) |
| 66 | + * Array: List of paths to CSS files to include when using specific skins |
| 67 | + * @example array( [file-path], [file-path], ... ) |
68 | 68 | */ |
69 | 69 | protected $skinStyles = array(); |
70 | 70 | /** |
71 | | - * @var {array} List of modules this module depends on |
72 | | - * @format array( [file-path], [file-path], ... ) |
| 71 | + * Array: List of modules this module depends on |
| 72 | + * @example array( [file-path], [file-path], ... ) |
73 | 73 | */ |
74 | 74 | protected $dependencies = array(); |
75 | 75 | /** |
76 | | - * @var {array} List of message keys used by this module |
77 | | - * @format array( [message-key], [message-key], ... ) |
| 76 | + * Array: List of message keys used by this module |
| 77 | + * @example array( [message-key], [message-key], ... ) |
78 | 78 | */ |
79 | 79 | protected $messages = array(); |
80 | | - /** @var {string} Name of group to load this module in */ |
| 80 | + /** String: Name of group to load this module in */ |
81 | 81 | protected $group; |
82 | | - /** @var {boolean} Link to raw files in debug mode */ |
| 82 | + /** Boolean: Link to raw files in debug mode */ |
83 | 83 | protected $debugRaw = true; |
84 | 84 | /** |
85 | | - * @var {array} Cache for mtime |
86 | | - * @format array( [hash] => [mtime], [hash] => [mtime], ... ) |
| 85 | + * Array: Cache for mtime |
| 86 | + * @example array( [hash] => [mtime], [hash] => [mtime], ... ) |
87 | 87 | */ |
88 | 88 | protected $modifiedTime = array(); |
89 | 89 | /** |
90 | | - * @var {array} Place where readStyleFile() tracks file dependencies |
91 | | - * @format array( [file-path], [file-path], ... ) |
| 90 | + * Array: Place where readStyleFile() tracks file dependencies |
| 91 | + * @example array( [file-path], [file-path], ... ) |
92 | 92 | */ |
93 | 93 | protected $localFileRefs = array(); |
94 | 94 | |
— | — | @@ -96,14 +96,14 @@ |
97 | 97 | /** |
98 | 98 | * Constructs a new module from an options array. |
99 | 99 | * |
100 | | - * @param {array} $options Options array. If not given or empty, an empty |
101 | | - * module will be constructed |
102 | | - * @param {string} $localBasePath base path to prepend to all local paths |
103 | | - * in $options. Defaults to $IP |
104 | | - * @param {string} $remoteBasePath base path to prepend to all remote paths |
105 | | - * in $options. Defaults to $wgScriptPath |
| 100 | + * @param $options Array: List of options; if not given or empty, an empty module will be |
| 101 | + * constructed |
| 102 | + * @param $localBasePath String: Base path to prepend to all local paths in $options. Defaults |
| 103 | + * to $IP |
| 104 | + * @param $remoteBasePath String: Base path to prepend to all remote paths in $options. Defaults |
| 105 | + * to $wgScriptPath |
106 | 106 | * |
107 | | - * @format $options |
| 107 | + * @example $options |
108 | 108 | * array( |
109 | 109 | * // Scripts to always include |
110 | 110 | * 'scripts' => [file path string or array of file path strings], |
— | — | @@ -188,8 +188,8 @@ |
189 | 189 | /** |
190 | 190 | * Gets all scripts for a given context concatenated together. |
191 | 191 | * |
192 | | - * @param {ResourceLoaderContext} $context Context in which to generate script |
193 | | - * @return {string} JavaScript code for $context |
| 192 | + * @param $context ResourceLoaderContext: Context in which to generate script |
| 193 | + * @return String: JavaScript code for $context |
194 | 194 | */ |
195 | 195 | public function getScript( ResourceLoaderContext $context ) { |
196 | 196 | global $wgServer; |
— | — | @@ -216,7 +216,7 @@ |
217 | 217 | /** |
218 | 218 | * Gets loader script. |
219 | 219 | * |
220 | | - * @return {string} JavaScript code to be added to startup module |
| 220 | + * @return String: JavaScript code to be added to startup module |
221 | 221 | */ |
222 | 222 | public function getLoaderScript() { |
223 | 223 | if ( count( $this->loaderScripts ) == 0 ) { |
— | — | @@ -228,8 +228,8 @@ |
229 | 229 | /** |
230 | 230 | * Gets all styles for a given context concatenated together. |
231 | 231 | * |
232 | | - * @param {ResourceLoaderContext} $context Context in which to generate styles |
233 | | - * @return {string} CSS code for $context |
| 232 | + * @param $context ResourceLoaderContext: Context in which to generate styles |
| 233 | + * @return String: CSS code for $context |
234 | 234 | */ |
235 | 235 | public function getStyles( ResourceLoaderContext $context ) { |
236 | 236 | // Merge general styles and skin specific styles, retaining media type collation |
— | — | @@ -263,7 +263,7 @@ |
264 | 264 | /** |
265 | 265 | * Gets list of message keys used by this module. |
266 | 266 | * |
267 | | - * @return {array} List of message keys |
| 267 | + * @return Array: List of message keys |
268 | 268 | */ |
269 | 269 | public function getMessages() { |
270 | 270 | return $this->messages; |
— | — | @@ -272,7 +272,7 @@ |
273 | 273 | /** |
274 | 274 | * Gets the name of the group this module should be loaded in. |
275 | 275 | * |
276 | | - * @return {string} Group name |
| 276 | + * @return String: Group name |
277 | 277 | */ |
278 | 278 | public function getGroup() { |
279 | 279 | return $this->group; |
— | — | @@ -281,7 +281,7 @@ |
282 | 282 | /** |
283 | 283 | * Gets list of names of modules this module depends on. |
284 | 284 | * |
285 | | - * @return {array} List of module names |
| 285 | + * @return Array: List of module names |
286 | 286 | */ |
287 | 287 | public function getDependencies() { |
288 | 288 | return $this->dependencies; |
— | — | @@ -296,10 +296,10 @@ |
297 | 297 | * calculations on files relevant to the given language, skin and debug |
298 | 298 | * mode. |
299 | 299 | * |
300 | | - * @param {ResourceLoaderContext} $context Context in which to calculate |
| 300 | + * @param $context ResourceLoaderContext: Context in which to calculate |
301 | 301 | * the modified time |
302 | | - * @return {integer} UNIX timestamp |
303 | | - * @see {ResourceLoaderModule::getFileDependencies} |
| 302 | + * @return Integer: UNIX timestamp |
| 303 | + * @see ResourceLoaderModule::getFileDependencies |
304 | 304 | */ |
305 | 305 | public function getModifiedTime( ResourceLoaderContext $context ) { |
306 | 306 | if ( isset( $this->modifiedTime[$context->getHash()] ) ) { |
— | — | @@ -365,9 +365,9 @@ |
366 | 366 | /** |
367 | 367 | * Collates file paths by option (where provided). |
368 | 368 | * |
369 | | - * @param {array} $list List of file paths in any combination of index/path |
| 369 | + * @param $list Array: List of file paths in any combination of index/path |
370 | 370 | * or path/options pairs |
371 | | - * @return {array} List of file paths, collated by $option |
| 371 | + * @return Array: List of file paths, collated by $option |
372 | 372 | */ |
373 | 373 | protected static function collateFilePathListByOption( array $list, $option, $default ) { |
374 | 374 | $collatedFiles = array(); |
— | — | @@ -393,10 +393,10 @@ |
394 | 394 | /** |
395 | 395 | * Gets a list of element that match a key, optionally using a fallback key. |
396 | 396 | * |
397 | | - * @param {array} $list List of lists to select from |
398 | | - * @param {string} $key Key to look for in $map |
399 | | - * @param {string} $fallback Key to look for in $list if $key doesn't exist |
400 | | - * @return {array} List of elements from $map which matched $key or $fallback, |
| 397 | + * @param $list Array: List of lists to select from |
| 398 | + * @param $key String: Key to look for in $map |
| 399 | + * @param $fallback String: Key to look for in $list if $key doesn't exist |
| 400 | + * @return Array: List of elements from $map which matched $key or $fallback, |
401 | 401 | * or an empty list in case of no match |
402 | 402 | */ |
403 | 403 | protected static function tryForKey( array $list, $key, $fallback = null ) { |
— | — | @@ -414,8 +414,8 @@ |
415 | 415 | /** |
416 | 416 | * Gets the contents of a list of JavaScript files. |
417 | 417 | * |
418 | | - * @param {array} $scripts List of file paths to scripts to read, remap and concetenate |
419 | | - * @return {string} Concatenated and remapped JavaScript data from $scripts |
| 418 | + * @param $scripts Array: List of file paths to scripts to read, remap and concetenate |
| 419 | + * @return String: Concatenated and remapped JavaScript data from $scripts |
420 | 420 | */ |
421 | 421 | protected function readScriptFiles( array $scripts ) { |
422 | 422 | if ( empty( $scripts ) ) { |
— | — | @@ -436,8 +436,8 @@ |
437 | 437 | /** |
438 | 438 | * Gets the contents of a list of CSS files. |
439 | 439 | * |
440 | | - * @param {array} $styles List of file paths to styles to read, remap and concetenate |
441 | | - * @return {array} List of concatenated and remapped CSS data from $styles, |
| 440 | + * @param $styles Array: List of file paths to styles to read, remap and concetenate |
| 441 | + * @return Array: List of concatenated and remapped CSS data from $styles, |
442 | 442 | * keyed by media type |
443 | 443 | */ |
444 | 444 | protected function readStyleFiles( array $styles ) { |
— | — | @@ -458,8 +458,8 @@ |
459 | 459 | * |
460 | 460 | * This method can be used as a callback for array_map() |
461 | 461 | * |
462 | | - * @param {string} $path File path of script file to read |
463 | | - * @return {string} CSS data in script file |
| 462 | + * @param $path String: File path of script file to read |
| 463 | + * @return String: CSS data in script file |
464 | 464 | */ |
465 | 465 | protected function readStyleFile( $path ) { |
466 | 466 | $localPath = $this->getLocalPath( $path ); |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderModule.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | * Get this module's name. This is set when the module is registered |
42 | 42 | * with ResourceLoader::register() |
43 | 43 | * |
44 | | - * @return Mixed: name (string) or null if no name was set |
| 44 | + * @return Mixed: Name (string) or null if no name was set |
45 | 45 | */ |
46 | 46 | public function getName() { |
47 | 47 | return $this->name; |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | * Set this module's name. This is called by ResourceLodaer::register() |
52 | 52 | * when registering the module. Other code should not call this. |
53 | 53 | * |
54 | | - * @param $name String: name |
| 54 | + * @param $name String: Name |
55 | 55 | */ |
56 | 56 | public function setName( $name ) { |
57 | 57 | $this->name = $name; |
— | — | @@ -67,8 +67,8 @@ |
68 | 68 | * Get all JS for this module for a given language and skin. |
69 | 69 | * Includes all relevant JS except loader scripts. |
70 | 70 | * |
71 | | - * @param $context ResourceLoaderContext object |
72 | | - * @return String: JS |
| 71 | + * @param $context ResourceLoaderContext: Context object |
| 72 | + * @return String: JavaScript code |
73 | 73 | */ |
74 | 74 | public function getScript( ResourceLoaderContext $context ) { |
75 | 75 | // Stub, override expected |
— | — | @@ -78,8 +78,8 @@ |
79 | 79 | /** |
80 | 80 | * Get all CSS for this module for a given skin. |
81 | 81 | * |
82 | | - * @param $context ResourceLoaderContext object |
83 | | - * @return array: strings of CSS keyed by media type |
| 82 | + * @param $context ResourceLoaderContext: Context object |
| 83 | + * @return Array: List of CSS strings keyed by media type |
84 | 84 | */ |
85 | 85 | public function getStyles( ResourceLoaderContext $context ) { |
86 | 86 | // Stub, override expected |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | * |
93 | 93 | * To get a JSON blob with messages, use MessageBlobStore::get() |
94 | 94 | * |
95 | | - * @return array of message keys. Keys may occur more than once |
| 95 | + * @return Array: List of message keys. Keys may occur more than once |
96 | 96 | */ |
97 | 97 | public function getMessages() { |
98 | 98 | // Stub, override expected |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | /** |
103 | 103 | * Get the group this module is in. |
104 | 104 | * |
105 | | - * @return string of group name |
| 105 | + * @return String: Group name |
106 | 106 | */ |
107 | 107 | public function getGroup() { |
108 | 108 | // Stub, override expected |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | /** |
113 | 113 | * Get the loader JS for this module, if set. |
114 | 114 | * |
115 | | - * @return Mixed: loader JS (string) or false if no custom loader set |
| 115 | + * @return Mixed: JavaScript loader code as a string or boolean false if no custom loader set |
116 | 116 | */ |
117 | 117 | public function getLoaderScript() { |
118 | 118 | // Stub, override expected |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | * |
133 | 133 | * To add dependencies dynamically on the client side, use a custom |
134 | 134 | * loader script, see getLoaderScript() |
135 | | - * @return Array of module names (strings) |
| 135 | + * @return Array: List of module names as strings |
136 | 136 | */ |
137 | 137 | public function getDependencies() { |
138 | 138 | // Stub, override expected |
— | — | @@ -142,8 +142,8 @@ |
143 | 143 | * Get the files this module depends on indirectly for a given skin. |
144 | 144 | * Currently these are only image files referenced by the module's CSS. |
145 | 145 | * |
146 | | - * @param $skin String: skin name |
147 | | - * @return array of files |
| 146 | + * @param $skin String: Skin name |
| 147 | + * @return Array: List of files |
148 | 148 | */ |
149 | 149 | public function getFileDependencies( $skin ) { |
150 | 150 | // Try in-object cache first |
— | — | @@ -168,8 +168,8 @@ |
169 | 169 | /** |
170 | 170 | * Set preloaded file dependency information. Used so we can load this |
171 | 171 | * information for all modules at once. |
172 | | - * @param $skin string Skin name |
173 | | - * @param $deps array Array of file names |
| 172 | + * @param $skin String: Skin name |
| 173 | + * @param $deps Array: Array of file names |
174 | 174 | */ |
175 | 175 | public function setFileDependencies( $skin, $deps ) { |
176 | 176 | $this->fileDeps[$skin] = $deps; |
— | — | @@ -178,8 +178,8 @@ |
179 | 179 | /** |
180 | 180 | * Get the last modification timestamp of the message blob for this |
181 | 181 | * module in a given language. |
182 | | - * @param $lang string Language code |
183 | | - * @return int UNIX timestamp, or 0 if no blob found |
| 182 | + * @param $lang String: Language code |
| 183 | + * @return Integer: UNIX timestamp, or 0 if no blob found |
184 | 184 | */ |
185 | 185 | public function getMsgBlobMtime( $lang ) { |
186 | 186 | if ( !count( $this->getMessages() ) ) |
— | — | @@ -198,8 +198,8 @@ |
199 | 199 | /** |
200 | 200 | * Set a preloaded message blob last modification timestamp. Used so we |
201 | 201 | * can load this information for all modules at once. |
202 | | - * @param $lang string Language code |
203 | | - * @param $mtime int UNIX timestamp or 0 if there is no such blob |
| 202 | + * @param $lang String: Language code |
| 203 | + * @param $mtime Integer: UNIX timestamp or 0 if there is no such blob |
204 | 204 | */ |
205 | 205 | public function setMsgBlobMtime( $lang, $mtime ) { |
206 | 206 | $this->msgBlobMtime[$lang] = $mtime; |
— | — | @@ -214,8 +214,8 @@ |
215 | 215 | * timestamps. Whenever anything happens that changes the module's |
216 | 216 | * contents for these parameters, the mtime should increase. |
217 | 217 | * |
218 | | - * @param $context ResourceLoaderContext object |
219 | | - * @return int UNIX timestamp |
| 218 | + * @param $context ResourceLoaderContext: Context object |
| 219 | + * @return Integer: UNIX timestamp |
220 | 220 | */ |
221 | 221 | public function getModifiedTime( ResourceLoaderContext $context ) { |
222 | 222 | // 0 would mean now |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | */ |
23 | 23 | |
24 | 24 | class ResourceLoaderStartUpModule extends ResourceLoaderModule { |
| 25 | + |
25 | 26 | /* Protected Members */ |
26 | 27 | |
27 | 28 | protected $modifiedTime = array(); |