Added Request::setLang() and RequestContext::setSkin(); the latter will clone the...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 9 Jul 2011 19:38:58 +0000 (19:38 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 9 Jul 2011 19:38:58 +0000 (19:38 +0000)
includes/RequestContext.php

index 48cca17..f26847e 100644 (file)
@@ -125,6 +125,15 @@ class RequestContext {
                return $this->user;
        }
 
+       /**
+        * Set the Language object
+        *
+        * @param $l Language
+        */
+       public function setLang( Language $l ) {
+               $this->lang = $l;
+       }
+
        /**
         * Get the Language object
         *
@@ -158,6 +167,16 @@ class RequestContext {
                return $this->lang;
        }
 
+       /**
+        * Set the Skin object
+        *
+        * @param $s Skin
+        */
+       public function setSkin( Skin $s ) {
+               $this->skin = clone $s;
+               $this->skin->setContext( $this );
+       }
+
        /**
         * Get the Skin object
         *