mirror of
https://github.com/friendica/friendica
synced 2025-04-26 08:30:10 +00:00
Creating interfaces for Config/PConfig & fix tests
This commit is contained in:
parent
4835f1185f
commit
c1dbb25656
54 changed files with 349 additions and 285 deletions
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Core\Cache;
|
||||
|
||||
use Exception;
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Memcache;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,7 @@ class MemcacheCache extends Cache implements IMemoryCache
|
|||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct(string $hostname, Configuration $config)
|
||||
public function __construct(string $hostname, IConfiguration $config)
|
||||
{
|
||||
if (!class_exists('Memcache', false)) {
|
||||
throw new Exception('Memcache class isn\'t available');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Core\Cache;
|
||||
|
||||
use Exception;
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Memcached;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
@ -39,7 +39,7 @@ class MemcachedCache extends Cache implements IMemoryCache
|
|||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(string $hostname, Configuration $config, LoggerInterface $logger)
|
||||
public function __construct(string $hostname, IConfiguration $config, LoggerInterface $logger)
|
||||
{
|
||||
if (!class_exists('Memcached', false)) {
|
||||
throw new Exception('Memcached class isn\'t available');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Core\Cache;
|
||||
|
||||
use Exception;
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Friendica\Core\Config\IConfiguration;
|
||||
use Redis;
|
||||
|
||||
/**
|
||||
|
@ -22,7 +22,7 @@ class RedisCache extends Cache implements IMemoryCache
|
|||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function __construct(string $hostname, Configuration $config)
|
||||
public function __construct(string $hostname, IConfiguration $config)
|
||||
{
|
||||
if (!class_exists('Redis', false)) {
|
||||
throw new Exception('Redis class isn\'t available');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue