mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 16:15:20 +02:00
format: Refactor format factory to non-static class
The format 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 factory. References #1001
This commit is contained in:
parent
2460b67886
commit
fc8421ed50
7 changed files with 32 additions and 95 deletions
|
@ -61,7 +61,7 @@ require_once PATH_LIB . 'FactoryAbstract.php';
|
|||
require_once PATH_LIB . 'FeedItem.php';
|
||||
require_once PATH_LIB . 'Debug.php';
|
||||
require_once PATH_LIB . 'Exceptions.php';
|
||||
require_once PATH_LIB . 'Format.php';
|
||||
require_once PATH_LIB . 'FormatFactory.php';
|
||||
require_once PATH_LIB . 'FormatAbstract.php';
|
||||
require_once PATH_LIB . 'BridgeFactory.php';
|
||||
require_once PATH_LIB . 'BridgeAbstract.php';
|
||||
|
@ -84,12 +84,3 @@ require_once PATH_LIB . 'contents.php';
|
|||
define('MAX_FILE_SIZE', 10000000); /* Allow larger files for simple_html_dom */
|
||||
require_once PATH_LIB_VENDOR . 'simplehtmldom/simple_html_dom.php';
|
||||
require_once PATH_LIB_VENDOR . 'php-urljoin/src/urljoin.php';
|
||||
|
||||
// Initialize static members
|
||||
try {
|
||||
Format::setWorkingDir(PATH_LIB_FORMATS);
|
||||
} catch(Exception $e) {
|
||||
error_log($e);
|
||||
header('Content-type: text/plain', true, 500);
|
||||
die($e->getMessage());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue