Merge "Changed FOR UPDATE handling in Postgresql"
[lhc/web/wiklou.git] / includes / parser / CacheTime.php
index 8190a8a..e1b3f28 100644 (file)
  * @ingroup Parser
  */
 class CacheTime {
+       /** @var  array|bool ParserOptions which have been taken into account to
+        * produce output or false if not available.
+        */
+       public $mUsedOptions;
 
        var     $mVersion = Parser::VERSION,  # Compatibility check
                $mCacheTime = '',             # Time when this object was generated, or -1 for uncacheable. Used in ParserCache.
                $mCacheExpiry = null,         # Seconds after which the object should expire, use 0 for uncachable. Used in ParserCache.
                $mContainsOldMagic;           # Boolean variable indicating if the input contained variables like {{CURRENTDAY}}
 
-       function getCacheTime()              { return $this->mCacheTime; }
+       /**
+        * @return string TS_MW timestamp
+        */
+       function getCacheTime() {
+               return wfTimestamp( TS_MW, $this->mCacheTime );
+       }
+
+       /**
+        * @return bool
+        */
+       function containsOldMagic() {
+               return $this->mContainsOldMagic;
+       }
 
-       function containsOldMagic()          { return $this->mContainsOldMagic; }
-       function setContainsOldMagic( $com ) { return wfSetVar( $this->mContainsOldMagic, $com ); }
+       /**
+        * @param $com bool
+        * @return bool
+        */
+       function setContainsOldMagic( $com ) {
+               return wfSetVar( $this->mContainsOldMagic, $com );
+       }
 
        /**
         * setCacheTime() sets the timestamp expressing when the page has been rendered.
-        * This doesn not control expiry, see updateCacheExpiry() for that!
+        * This does not control expiry, see updateCacheExpiry() for that!
         * @param $t string
         * @return string
         */
-       function setCacheTime( $t )          { return wfSetVar( $this->mCacheTime, $t ); }
+       function setCacheTime( $t ) {
+               return wfSetVar( $this->mCacheTime, $t );
+       }
 
        /**
         * Sets the number of seconds after which this object should expire.