summaryrefslogtreecommitdiff
path: root/includes/context/ContextSource.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/context/ContextSource.php
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/context/ContextSource.php')
-rw-r--r--includes/context/ContextSource.php22
1 files changed, 15 insertions, 7 deletions
diff --git a/includes/context/ContextSource.php b/includes/context/ContextSource.php
index 45bd6fff..33f51cb9 100644
--- a/includes/context/ContextSource.php
+++ b/includes/context/ContextSource.php
@@ -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,12 +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();
+ }
+}