summaryrefslogtreecommitdiff
path: root/includes/actions/CachedAction.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /includes/actions/CachedAction.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/actions/CachedAction.php')
-rw-r--r--includes/actions/CachedAction.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/includes/actions/CachedAction.php b/includes/actions/CachedAction.php
index bfdda7b9..bc4df349 100644
--- a/includes/actions/CachedAction.php
+++ b/includes/actions/CachedAction.php
@@ -58,7 +58,7 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
* If the cache is enabled or not.
*
* @since 1.20
- * @var boolean
+ * @var bool
*/
protected $cacheEnabled = true;
@@ -66,7 +66,7 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
* Sets if the cache should be enabled or not.
*
* @since 1.20
- * @param boolean $cacheEnabled
+ * @param bool $cacheEnabled
*/
public function setCacheEnabled( $cacheEnabled ) {
$this->cacheHelper->setCacheEnabled( $cacheEnabled );
@@ -78,8 +78,8 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
*
* @since 1.20
*
- * @param integer|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
- * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
+ * @param int|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
+ * @param bool|null $cacheEnabled Sets if the cache should be enabled or not.
*/
public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
$this->cacheHelper = new CacheHelper();
@@ -110,7 +110,7 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
*
* @since 1.20
*
- * @param {function} $computeFunction
+ * @param callable $computeFunction
* @param array|mixed $args
* @param string|null $key
*
@@ -128,12 +128,13 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
*
* @since 1.20
*
- * @param {function} $computeFunction
+ * @param callable $computeFunction
* @param array $args
* @param string|null $key
*/
public function addCachedHTML( $computeFunction, $args = array(), $key = null ) {
- $this->getOutput()->addHTML( $this->cacheHelper->getCachedValue( $computeFunction, $args, $key ) );
+ $html = $this->cacheHelper->getCachedValue( $computeFunction, $args, $key );
+ $this->getOutput()->addHTML( $html );
}
/**
@@ -147,11 +148,12 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
}
/**
- * Sets the time to live for the cache, in seconds or a unix timestamp indicating the point of expiry.
+ * Sets the time to live for the cache, in seconds or a unix timestamp
+ * indicating the point of expiry.
*
* @since 1.20
*
- * @param integer $cacheExpiry
+ * @param int $cacheExpiry
*/
public function setExpiry( $cacheExpiry ) {
$this->cacheHelper->setExpiry( $cacheExpiry );
@@ -177,12 +179,11 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper {
*
* @since 1.20
*
- * @param boolean $hasCached
+ * @param bool $hasCached
*/
public function onCacheInitialized( $hasCached ) {
if ( $hasCached ) {
$this->getOutput()->setSubtitle( $this->cacheHelper->getCachedNotice( $this->getContext() ) );
}
}
-
}