From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- .../DerivativeResourceLoaderContext.php | 202 +++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 includes/resourceloader/DerivativeResourceLoaderContext.php (limited to 'includes/resourceloader/DerivativeResourceLoaderContext.php') diff --git a/includes/resourceloader/DerivativeResourceLoaderContext.php b/includes/resourceloader/DerivativeResourceLoaderContext.php new file mode 100644 index 00000000..d114d7ed --- /dev/null +++ b/includes/resourceloader/DerivativeResourceLoaderContext.php @@ -0,0 +1,202 @@ +context = $context; + } + + public function getModules() { + if ( !is_null( $this->modules ) ) { + return $this->modules; + } else { + return $this->context->getModules(); + } + } + + /** + * @param string[] $modules + */ + public function setModules( array $modules ) { + $this->modules = $modules; + } + + public function getLanguage() { + if ( !is_null( $this->language ) ) { + return $this->language; + } else { + return $this->context->getLanguage(); + } + } + + /** + * @param string $language + */ + public function setLanguage( $language ) { + $this->language = $language; + $this->direction = null; // Invalidate direction since it might be based on language + $this->hash = null; + } + + public function getDirection() { + if ( !is_null( $this->direction ) ) { + return $this->direction; + } else { + return $this->context->getDirection(); + } + } + + /** + * @param string $direction + */ + public function setDirection( $direction ) { + $this->direction = $direction; + $this->hash = null; + } + + public function getSkin() { + if ( !is_null( $this->skin ) ) { + return $this->skin; + } else { + return $this->context->getSkin(); + } + } + + /** + * @param string $skin + */ + public function setSkin( $skin ) { + $this->skin = $skin; + $this->hash = null; + } + + public function getUser() { + if ( !is_null( $this->user ) ) { + return $this->user; + } else { + return $this->context->getUser(); + } + } + + /** + * @param string $user + */ + public function setUser( $user ) { + $this->user = $user; + $this->hash = null; + } + + public function getDebug() { + if ( !is_null( $this->debug ) ) { + return $this->debug; + } else { + return $this->context->getDebug(); + } + } + + /** + * @param bool $debug + */ + public function setDebug( $debug ) { + $this->debug = $debug; + $this->hash = null; + } + + public function getOnly() { + if ( !is_null( $this->only ) ) { + return $this->only; + } else { + return $this->context->getOnly(); + } + } + + /** + * @param string $only + */ + public function setOnly( $only ) { + $this->only = $only; + $this->hash = null; + } + + public function getVersion() { + if ( !is_null( $this->version ) ) { + return $this->version; + } else { + return $this->context->getVersion(); + } + } + + /** + * @param string $version + */ + public function setVersion( $version ) { + $this->version = $version; + $this->hash = null; + } + + public function getRaw() { + if ( !is_null( $this->raw ) ) { + return $this->raw; + } else { + return $this->context->getRaw(); + } + } + + /** + * @param bool $raw + */ + public function setRaw( $raw ) { + $this->raw = $raw; + } + + public function getRequest() { + return $this->context->getRequest(); + } + + public function getResourceLoader() { + return $this->context->getResourceLoader(); + } + +} -- cgit v1.2.2