Merge "Begin exposing SiteConfiguration via site contexts"
[lhc/web/wiklou.git] / includes / context / RequestContext.php
index 04879e2..5f91731 100644 (file)
@@ -63,6 +63,33 @@ class RequestContext implements IContextSource {
         */
        private $skin;
 
+       /**
+        * @var SiteConfiguration
+        */
+       private $config;
+
+       /**
+        * Set the SiteConfiguration object
+        *
+        * @param SiteConfiguration $c
+        */
+       public function setConfig( SiteConfiguration $c ) {
+               $this->config = $c;
+       }
+
+       /**
+        * Get the SiteConfiguration object
+        *
+        * @return SiteConfiguration
+        */
+       public function getConfig() {
+               if ( $this->config === null ) {
+                       global $wgConf;
+                       $this->config = $wgConf;
+               }
+               return $this->config;
+       }
+
        /**
         * Set the WebRequest object
         *