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;
}
/**
* Get the Language object
*
- * @deprecated 1.19 Use getLanguage instead
+ * @deprecated since 1.19 Use getLanguage instead
* @return Language
*/
public function getLang() {
wfDeprecated( __METHOD__, '1.19' );
+
return $this->getLanguage();
}
*/
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();
+ }
}