fix for r36212: take care of the namespace too
[lhc/web/wiklou.git] / includes / AjaxResponse.php
index cb4af1b..c79e928 100644 (file)
@@ -1,21 +1,39 @@
 <?php
+/**
+ * @file
+ * @ingroup Ajax
+ */
+
 if( !defined( 'MEDIAWIKI' ) ) {
        die( 1 );
 }
 
 /**
  * @todo document
- * @addtogroup Ajax
+ * @ingroup 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;
@@ -52,18 +70,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;
 
@@ -83,7 +104,7 @@ class AjaxResponse {
 
                if ( $this->mCacheDuration ) {
 
-                       # If squid caches are configured, tell them to cache the response, 
+                       # If squid caches are configured, tell them to cache the response,
                        # and tell the client to always check with the squid. Otherwise,
                        # tell the client to use a cached copy, without a way to purge it.
 
@@ -204,4 +225,3 @@ class AjaxResponse {
                return true;
        }
 }
-?>