Partial revert of r32982; old Title method is fine here
[lhc/web/wiklou.git] / includes / AjaxResponse.php
index c3c15ad..8fa0853 100644 (file)
@@ -3,16 +3,32 @@ if( !defined( 'MEDIAWIKI' ) ) {
        die( 1 );
 }
 
-/** @todo document */
+/**
+ * @todo document
+ * @addtogroup Ajax
+ */
 class AjaxResponse {
-       var $mCacheDuration;
-       var $mVary;
 
-       var $mDisabled;
-       var $mText;
-       var $mResponseCode;
-       var $mLastModified;
-       var $mContentType;
+       /** Number of seconds to get the response cached by a proxy */
+       private $mCacheDuration;
+
+       /** HTTP header Content-Type */
+       private $mContentType;
+
+       /** @todo document */
+       private $mDisabled;
+
+       /** Date for the HTTP header Last-modified */
+       private $mLastModified;
+
+       /** HTTP response code */
+       private $mResponseCode;
+
+       /** HTTP Vary header */
+       private $mVary;
+
+       /** Content of our HTTP response */
+       private $mText;
 
        function __construct( $text = NULL ) {
                $this->mCacheDuration = NULL;
@@ -49,18 +65,21 @@ class AjaxResponse {
                $this->mDisabled = true;
        }
 
+       /** Add content to the response */
        function addText( $text ) {
                if ( ! $this->mDisabled && $text ) {
                        $this->mText .= $text;
                }
        }
 
+       /** Output text */
        function printText() {
                if ( ! $this->mDisabled ) {
                        print $this->mText;
                }
        }
 
+       /** Construct the header and output it */
        function sendHeaders() {
                global $wgUseSquid, $wgUseESI;
 
@@ -201,4 +220,4 @@ class AjaxResponse {
                return true;
        }
 }
-?>
+