From b81613e5e57fd208e832637b6886abf9ec806c4b Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 14 Jul 2013 12:25:28 -0400 Subject: [ticket/11700] With namespaces interface will no longer be a valid classname PHPBB3-11700 --- phpBB/phpbb/cache/driver/driver_interface.php | 144 ++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 phpBB/phpbb/cache/driver/driver_interface.php (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php new file mode 100644 index 0000000000..34028b82e2 --- /dev/null +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -0,0 +1,144 @@ + Date: Tue, 10 Sep 2013 14:01:09 +0200 Subject: [ticket/11700] Move all recent code to namespaces PHPBB3-11700 --- phpBB/phpbb/cache/driver/driver_interface.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php index 34028b82e2..34c60b5935 100644 --- a/phpBB/phpbb/cache/driver/driver_interface.php +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\cache\driver; + /** * @ignore */ @@ -20,7 +22,7 @@ if (!defined('IN_PHPBB')) * * @package acm */ -interface phpbb_cache_driver_driver_interface +interface driver_interface { /** * Load global cache @@ -85,10 +87,10 @@ interface phpbb_cache_driver_driver_interface * result to persistent storage. In other words, there is no need * to call save() afterwards. * - * @param phpbb_db_driver $db Database connection + * @param \phpbb\db\driver\driver $db Database connection * @param string $query SQL query, should be used for generating storage key - * @param mixed $query_result The result from dbal::sql_query, to be passed to - * dbal::sql_fetchrow to get all rows and store them + * @param mixed $query_result The result from \dbal::sql_query, to be passed to + * \dbal::sql_fetchrow to get all rows and store them * in cache. * @param int $ttl Time to live, after this timeout the query should * expire from the cache. @@ -96,7 +98,7 @@ interface phpbb_cache_driver_driver_interface * representing the query should be returned. Otherwise * the original $query_result should be returned. */ - public function sql_save(phpbb_db_driver $db, $query, $query_result, $ttl); + public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl); /** * Check if result for a given SQL query exists in cache. -- cgit v1.2.1 From 7aa8f6461f1e85cf91931f56b95384e54fec07c2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 30 Oct 2013 13:05:28 +0100 Subject: [task/code-sniffer] Remove the IN_PHPBB check side-effect from class files. PHPBB3-11980 --- phpBB/phpbb/cache/driver/driver_interface.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php index 34c60b5935..0715a4b934 100644 --- a/phpBB/phpbb/cache/driver/driver_interface.php +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -9,14 +9,6 @@ namespace phpbb\cache\driver; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * An interface that all cache drivers must implement * -- cgit v1.2.1 From b87fc1e56cb3701a89db2b6012f37bd75f52f29d Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 22 Mar 2014 08:23:18 -0700 Subject: [ticket/11230] Update cache driver dock blocks PHPBB3-12230 --- phpBB/phpbb/cache/driver/driver_interface.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php index 0715a4b934..d4569bb314 100644 --- a/phpBB/phpbb/cache/driver/driver_interface.php +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -18,6 +18,8 @@ interface driver_interface { /** * Load global cache + * + * @return mixed False if an error was encountered, otherwise the data type of the cached data */ public function load(); @@ -28,36 +30,58 @@ interface driver_interface /** * Save modified objects + * + * @return null */ public function save(); /** * Tidy cache + * + * @return null */ public function tidy(); /** * Get saved cache object + * + * @param string $var_name Cache key + * @return mixed False if an error was encountered, otherwise the saved cached object */ public function get($var_name); /** * Put data into cache + * + * @param string $var_name Cache key + * @param mixed $var Cached data to store + * @param int $ttl Time-to-live of cached data */ public function put($var_name, $var, $ttl = 0); /** * Purge cache data + * + * @return null */ public function purge(); /** * Destroy cache data + * + * @param string $var_name Cache key + * @param string $table Table name + * @return null */ public function destroy($var_name, $table = ''); /** * Check if a given cache entry exists + * + * @param string $var_name Cache key + * + * @return bool True if cache file exists and has not expired. + * False otherwise. */ public function _exists($var_name); -- cgit v1.2.1 From dab35589fec70018ac18aef355823e4cf9287fb4 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 28 Mar 2014 09:12:42 -0700 Subject: [ticket/11230] Add missing last returns to dock block PHPBB3-11230 --- phpBB/phpbb/cache/driver/driver_interface.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php index d4569bb314..8444028115 100644 --- a/phpBB/phpbb/cache/driver/driver_interface.php +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -25,6 +25,8 @@ interface driver_interface /** * Unload cache object + * + * @return null */ public function unload(); @@ -56,6 +58,7 @@ interface driver_interface * @param string $var_name Cache key * @param mixed $var Cached data to store * @param int $ttl Time-to-live of cached data + * @return null */ public function put($var_name, $var, $ttl = 0); -- cgit v1.2.1 From 11a9104b8a50cbc62cba0c242dee554b5209a327 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 17 Mar 2014 13:29:35 +0100 Subject: [ticket/12282] Use interface for type hinting PHPBB3-12282 --- phpBB/phpbb/cache/driver/driver_interface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php index 8444028115..8929647411 100644 --- a/phpBB/phpbb/cache/driver/driver_interface.php +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -106,7 +106,7 @@ interface driver_interface * result to persistent storage. In other words, there is no need * to call save() afterwards. * - * @param \phpbb\db\driver\driver $db Database connection + * @param \phpbb\db\driver\driver_interface $db Database connection * @param string $query SQL query, should be used for generating storage key * @param mixed $query_result The result from \dbal::sql_query, to be passed to * \dbal::sql_fetchrow to get all rows and store them @@ -117,7 +117,7 @@ interface driver_interface * representing the query should be returned. Otherwise * the original $query_result should be returned. */ - public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl); + public function sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl); /** * Check if result for a given SQL query exists in cache. -- cgit v1.2.1 From a759704b39fc1c1353f865a633759b1369589b67 Mon Sep 17 00:00:00 2001 From: Yuriy Rusko Date: Tue, 27 May 2014 20:18:06 +0200 Subject: [ticket/12594] Remove @package tags and update file headers PHPBB3-12594 --- phpBB/phpbb/cache/driver/driver_interface.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php index 8929647411..7d08362ed8 100644 --- a/phpBB/phpbb/cache/driver/driver_interface.php +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -1,9 +1,13 @@ +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -11,8 +15,6 @@ namespace phpbb\cache\driver; /** * An interface that all cache drivers must implement -* -* @package acm */ interface driver_interface { -- cgit v1.2.1 From b6f3bf9b0ce0b186654bfd44c0fd639599d89400 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sat, 14 Jun 2014 22:16:49 +0200 Subject: [ticket/12715] Cleanup comments in \phpbb\cache\driver\* PHPBB3-12715 --- phpBB/phpbb/cache/driver/driver_interface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/cache/driver/driver_interface.php') diff --git a/phpBB/phpbb/cache/driver/driver_interface.php b/phpBB/phpbb/cache/driver/driver_interface.php index 7d08362ed8..9ac9ca0c59 100644 --- a/phpBB/phpbb/cache/driver/driver_interface.php +++ b/phpBB/phpbb/cache/driver/driver_interface.php @@ -142,7 +142,7 @@ interface driver_interface * Fetch a field from the current row of a cached database result (database) * * @param int $query_id - * @param $field The name of the column. + * @param string $field The name of the column. * @return string|bool The field of the query result if found in the cache, * otherwise false. */ -- cgit v1.2.1