bridge: Refactor bridge factory to non-static class

The bridge factory can be based on the abstract factory class if it
wasn't static. This allows for higher abstraction and makes future
extensions possible. Also, not all parts of RSS-Bridge need to work
on the same instance of the bridge factory.

References #1001
This commit is contained in:
logmanoriginal 2019-06-18 18:55:29 +02:00
parent 1ada9c26f8
commit 705b9daa0b
7 changed files with 52 additions and 101 deletions

View file

@ -63,7 +63,7 @@ require_once PATH_LIB . 'Debug.php';
require_once PATH_LIB . 'Exceptions.php';
require_once PATH_LIB . 'Format.php';
require_once PATH_LIB . 'FormatAbstract.php';
require_once PATH_LIB . 'Bridge.php';
require_once PATH_LIB . 'BridgeFactory.php';
require_once PATH_LIB . 'BridgeAbstract.php';
require_once PATH_LIB . 'FeedExpander.php';
require_once PATH_LIB . 'Cache.php';
@ -87,7 +87,6 @@ require_once PATH_LIB_VENDOR . 'php-urljoin/src/urljoin.php';
// Initialize static members
try {
Bridge::setWorkingDir(PATH_LIB_BRIDGES);
Format::setWorkingDir(PATH_LIB_FORMATS);
Cache::setWorkingDir(PATH_LIB_CACHES);
} catch(Exception $e) {