Localisation updates from http://translatewiki.net.
[lhc/web/wiklou.git] / includes / context / ContextSource.php
index d5a6d15..33f51cb 100644 (file)
@@ -28,7 +28,6 @@
  * member variable and provide accessors to it.
  */
 abstract class ContextSource implements IContextSource {
-
        /**
         * @var IContextSource
         */
@@ -42,7 +41,7 @@ abstract class ContextSource implements IContextSource {
        public function getContext() {
                if ( $this->context === null ) {
                        $class = get_class( $this );
-                       wfDebug( __METHOD__  . " ($class): called and \$context is null. Using RequestContext::getMain() for sanity\n" );
+                       wfDebug( __METHOD__ . " ($class): called and \$context is null. Using RequestContext::getMain() for sanity\n" );
                        $this->context = RequestContext::getMain();
                }
                return $this->context;
@@ -52,7 +51,7 @@ abstract class ContextSource implements IContextSource {
         * Set the IContextSource object
         *
         * @since 1.18
-        * @param $context IContextSource
+        * @param IContextSource $context
         */
        public function setContext( IContextSource $context ) {
                $this->context = $context;
@@ -107,7 +106,7 @@ abstract class ContextSource implements IContextSource {
         * Get the OutputPage object
         *
         * @since 1.18
-        * @return OutputPage object
+        * @return OutputPage
         */
        public function getOutput() {
                return $this->getContext()->getOutput();
@@ -159,10 +158,21 @@ abstract class ContextSource implements IContextSource {
         * Parameters are the same as wfMessage()
         *
         * @since 1.18
-        * @return Message object
+        * @return Message
         */
        public function msg( /* $args */ ) {
                $args = func_get_args();
                return call_user_func_array( array( $this->getContext(), 'msg' ), $args );
        }
+
+       /**
+        * Export the resolved user IP, HTTP headers, user ID, and session ID.
+        * The result will be reasonably sized to allow for serialization.
+        *
+        * @return Array
+        * @since 1.21
+        */
+       public function exportSession() {
+               return $this->getContext()->exportSession();
+       }
 }