From e09fb44b559e8218bf1b192ae1d06c4af75ae05c Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 11 Mar 2018 11:32:18 +0100 Subject: [PATCH] [BridgeAbstract] Change scope of 'getCacheTimeout' to public --- lib/BridgeAbstract.php | 13 +------------ lib/BridgeInterface.php | 7 +++++++ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/BridgeAbstract.php b/lib/BridgeAbstract.php index 72cb4585..0bd1c7c7 100644 --- a/lib/BridgeAbstract.php +++ b/lib/BridgeAbstract.php @@ -270,12 +270,6 @@ abstract class BridgeAbstract implements BridgeInterface { $this->cache = $cache; } - /** - * Sets the cache timeout to the provided timeout value. The specified - * timeout must be between 1..86400, otherwise the default timeout is used. - * - * @param int $timeout The timeout in seconds - */ public function setCacheTimeout($timeout){ if(is_numeric($timeout) && ($timeout < 1 || $timeout > 86400)) { $this->cacheTimeout = static::CACHE_TIMEOUT; @@ -285,12 +279,7 @@ abstract class BridgeAbstract implements BridgeInterface { $this->cacheTimeout = $timeout; } - /** - * Returns the cache timeout - * - * @return int Returns the cache timeout - */ - protected function getCacheTimeout(){ + public function getCacheTimeout(){ return isset($this->cacheTimeout) ? $this->cacheTimeout : static::CACHE_TIMEOUT; } } diff --git a/lib/BridgeInterface.php b/lib/BridgeInterface.php index 65ea8a65..b8f5cf47 100644 --- a/lib/BridgeInterface.php +++ b/lib/BridgeInterface.php @@ -77,4 +77,11 @@ interface BridgeInterface { * @param int $timeout The cache timeout in seconds */ public function setCacheTimeout($timeout); + + /** + * Returns the cache timeout + * + * @return int Cache timeout + */ + public function getCacheTimeout(); }