<?php
/**
- * Derivative 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
*/
/**
+ * A mutable version of ResourceLoaderContext.
+ *
* Allows changing specific properties of a context object,
- * without changing the main one. Inspired by DerivativeContext.
+ * without changing the main one. Inspired by MediaWiki's DerivativeContext.
*
+ * @ingroup ResourceLoader
* @since 1.24
*/
class DerivativeResourceLoaderContext extends ResourceLoaderContext {
*/
private $context;
+ /** @var int|array */
protected $modules = self::INHERIT_VALUE;
protected $language = self::INHERIT_VALUE;
protected $direction = self::INHERIT_VALUE;
if ( $this->modules === self::INHERIT_VALUE ) {
return $this->context->getModules();
}
+
return $this->modules;
}