Add devunt to CREDITS as patch contributor
[lhc/web/wiklou.git] / includes / AjaxResponse.php
index 52f3e2b..138f808 100644 (file)
  * @ingroup Ajax
  */
 class AjaxResponse {
-       /** Number of seconds to get the response cached by a proxy */
+
+       /**
+        * Number of seconds to get the response cached by a proxy
+        * @var int $mCacheDuration
+        */
        private $mCacheDuration;
 
-       /** HTTP header Content-Type */
+       /**
+        * HTTP header Content-Type
+        * @var string $mContentType
+        */
        private $mContentType;
 
-       /** Disables output. Can be set by calling $AjaxResponse->disable() */
+       /**
+        * Disables output. Can be set by calling $AjaxResponse->disable()
+        * @var bool $mDisabled
+        */
        private $mDisabled;
 
-       /** Date for the HTTP header Last-modified */
+       /**
+        * Date for the HTTP header Last-modified
+        * @var string|false $mLastModified
+        */
        private $mLastModified;
 
-       /** HTTP response code */
+       /**
+        * HTTP response code
+        * @var string $mResponseCode
+        */
        private $mResponseCode;
 
-       /** HTTP Vary header */
+       /**
+        * HTTP Vary header
+        * @var string $mVary
+        */
        private $mVary;
 
-       /** Content of our HTTP response */
+       /**
+        * Content of our HTTP response
+        * @var string $mText
+        */
        private $mText;
 
        /**
@@ -67,22 +89,41 @@ class AjaxResponse {
                }
        }
 
+       /**
+        * Set the number of seconds to get the response cached by a proxy
+        * @param $duration int
+        */
        function setCacheDuration( $duration ) {
                $this->mCacheDuration = $duration;
        }
 
+       /**
+        * Set the HTTP Vary header
+        * @param $vary string
+        */
        function setVary( $vary ) {
                $this->mVary = $vary;
        }
 
+       /**
+        * Set the HTTP response code
+        * @param $code string
+        */
        function setResponseCode( $code ) {
                $this->mResponseCode = $code;
        }
 
+       /**
+        * Set the HTTP header Content-Type
+        * @param $type string
+        */
        function setContentType( $type ) {
                $this->mContentType = $type;
        }
 
+       /**
+        * Disable output.
+        */
        function disable() {
                $this->mDisabled = true;
        }
@@ -131,7 +172,7 @@ class AjaxResponse {
                        # tell the client to use a cached copy, without a way to purge it.
 
                        if ( $wgUseSquid ) {
-                               # Expect explicite purge of the proxy cache, but require end user agents
+                               # Expect explicit purge of the proxy cache, but require end user agents
                                # to revalidate against the proxy on each visit.
                                # Surrogate-Control controls our Squid, Cache-Control downstream caches
 
@@ -163,7 +204,7 @@ class AjaxResponse {
 
        /**
         * checkLastModified tells the client to use the client-cached response if
-        * possible. If sucessful, the AjaxResponse is disabled so that
+        * possible. If successful, the AjaxResponse is disabled so that
         * any future call to AjaxResponse::printText() have no effect.
         *
         * @param $timestamp string
@@ -222,8 +263,8 @@ class AjaxResponse {
        }
 
        /**
-        * @param $mckey
-        * @param $touched
+        * @param $mckey string
+        * @param $touched int
         * @return bool
         */
        function loadFromMemcached( $mckey, $touched ) {
@@ -250,7 +291,7 @@ class AjaxResponse {
        }
 
        /**
-        * @param $mckey
+        * @param $mckey string
         * @param $expiry int
         * @return bool
         */