X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Factions%2FCachedAction.php;h=864094de7abaf14ac21856243e5ff9f241b32768;hp=bc4df349b268f616f87fd49a609cdcb4d3f3b56f;hb=e3bd13db0c285f312e31bb1b7271af4628cca80c;hpb=66d3eb56afc737e4e5ee66f7cad1dc78d1aec6b0 diff --git a/includes/actions/CachedAction.php b/includes/actions/CachedAction.php index bc4df349b2..864094de7a 100644 --- a/includes/actions/CachedAction.php +++ b/includes/actions/CachedAction.php @@ -85,7 +85,7 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper { $this->cacheHelper = new CacheHelper(); $this->cacheHelper->setCacheEnabled( $this->cacheEnabled ); - $this->cacheHelper->setOnInitializedHandler( array( $this, 'onCacheInitialized' ) ); + $this->cacheHelper->setOnInitializedHandler( [ $this, 'onCacheInitialized' ] ); $keyArgs = $this->getCacheKey(); @@ -116,7 +116,7 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper { * * @return mixed */ - public function getCachedValue( $computeFunction, $args = array(), $key = null ) { + public function getCachedValue( $computeFunction, $args = [], $key = null ) { return $this->cacheHelper->getCachedValue( $computeFunction, $args, $key ); } @@ -132,7 +132,7 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper { * @param array $args * @param string|null $key */ - public function addCachedHTML( $computeFunction, $args = array(), $key = null ) { + public function addCachedHTML( $computeFunction, $args = [], $key = null ) { $html = $this->cacheHelper->getCachedValue( $computeFunction, $args, $key ); $this->getOutput()->addHTML( $html ); } @@ -167,11 +167,11 @@ abstract class CachedAction extends FormlessAction implements ICacheHelper { * @return array */ protected function getCacheKey() { - return array( + return [ get_class( $this->page ), $this->getName(), $this->getLanguage()->getCode() - ); + ]; } /**