From 5ccde61a19cb61281928f9b89145efdbe1d6a0e0 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sat, 8 Oct 2016 15:04:14 +0200 Subject: [PATCH] [FileCache] Rename 'prepare' to 'setParameters' This is a cosmetic change to use the same naming convention for all methods. --- caches/FileCache.php | 8 ++++++-- lib/BridgeAbstract.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/caches/FileCache.php b/caches/FileCache.php index 7878d348..58b7928f 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -55,7 +55,11 @@ class FileCache implements CacheInterface { } } - public function prepare(array $param){ + /** + * Set HTTP GET parameters + * @return self + */ + public function setParameters(array $param){ $this->param = $param; return $this; @@ -68,7 +72,7 @@ class FileCache implements CacheInterface { */ protected function isPrepareCache(){ if(is_null($this->param)){ - throw new \Exception('Please feed "prepare" method before try to load'); + throw new \Exception('Please feed "setParameters" method before try to load'); } return true; diff --git a/lib/BridgeAbstract.php b/lib/BridgeAbstract.php index 90e997c9..8ac633dd 100644 --- a/lib/BridgeAbstract.php +++ b/lib/BridgeAbstract.php @@ -138,7 +138,7 @@ abstract class BridgeAbstract implements BridgeInterface { */ public function setDatas(array $inputs){ if(!is_null($this->cache)){ - $this->cache->prepare($inputs); + $this->cache->setParameters($inputs); $time = $this->cache->getTime(); if($time !== false && (time() - static::CACHE_TIMEOUT < $time)