mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 00:27:27 +02:00
refactor: introduce DI container (#4238)
* refactor: introduce DI container * add bin/test
This commit is contained in:
@@ -8,10 +8,12 @@ final class BridgeFactory
|
||||
private array $enabledBridges = [];
|
||||
private array $missingEnabledBridges = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->cache = RssBridge::getCache();
|
||||
$this->logger = RssBridge::getLogger();
|
||||
public function __construct(
|
||||
CacheInterface $cache,
|
||||
Logger $logger
|
||||
) {
|
||||
$this->cache = $cache;
|
||||
$this->logger = $logger;
|
||||
|
||||
// Create all possible bridge class names from fs
|
||||
foreach (scandir(__DIR__ . '/../bridges/') as $file) {
|
||||
|
Reference in New Issue
Block a user