<?php
/**
- * Context for ResourceLoader modules.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
use MediaWiki\MediaWikiServices;
/**
- * Object passed around to modules which contains information about the state
- * of a specific loader request.
+ * Context object that contains information about the state of a specific
+ * ResourceLoader web request. Passed around to ResourceLoaderModule methods.
+ *
+ * @ingroup ResourceLoader
+ * @since 1.17
*/
class ResourceLoaderContext implements MessageLocalizer {
const DEFAULT_LANG = 'qqx';
protected $direction;
protected $hash;
protected $userObj;
+ /** @var ResourceLoaderImage|false */
protected $imageObj;
/**
// Various parameters
$this->user = $request->getRawVal( 'user' );
$this->debug = $request->getRawVal( 'debug' ) === 'true';
- $this->only = $request->getRawVal( 'only', null );
- $this->version = $request->getRawVal( 'version', null );
+ $this->only = $request->getRawVal( 'only' );
+ $this->version = $request->getRawVal( 'version' );
$this->raw = $request->getFuzzyBool( 'raw' );
// Image requests
* @param string|string[]|MessageSpecifier $key Message key, or array of keys,
* or a MessageSpecifier.
* @param mixed $args,...
+ * @suppress PhanCommentParamWithoutRealParam HHVM bug T228695#5450847
* @return Message
*/
public function msg( $key ) {