mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 16:46:30 +02:00
Improve Factory variable names (#2895)
This commit is contained in:
@@ -405,9 +405,9 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
*/
|
||||
protected function loadCacheValue($key, $duration = 86400)
|
||||
{
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create();
|
||||
$cache = $cacheFactory->create();
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey($key);
|
||||
if ($cache->getTime() < time() - $duration) {
|
||||
@@ -424,9 +424,9 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
*/
|
||||
protected function saveCacheValue($key, $value)
|
||||
{
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create();
|
||||
$cache = $cacheFactory->create();
|
||||
$cache->setScope(get_called_class());
|
||||
$cache->setKey($key);
|
||||
$cache->saveData($value);
|
||||
|
@@ -304,9 +304,9 @@ This bridge is not fetching its content through a secure connection</div>';
|
||||
*/
|
||||
public static function displayBridgeCard($bridgeName, $formats, $isActive = true)
|
||||
{
|
||||
$bridgeFac = new \BridgeFactory();
|
||||
$bridgeFactory = new \BridgeFactory();
|
||||
|
||||
$bridge = $bridgeFac->create($bridgeName);
|
||||
$bridge = $bridgeFactory->create($bridgeName);
|
||||
|
||||
if ($bridge == false) {
|
||||
return '';
|
||||
|
@@ -65,16 +65,16 @@ EOD;
|
||||
$totalActiveBridges = 0;
|
||||
$inactiveBridges = '';
|
||||
|
||||
$bridgeFac = new \BridgeFactory();
|
||||
$bridgeList = $bridgeFac->getBridgeNames();
|
||||
$bridgeFactory = new \BridgeFactory();
|
||||
$bridgeNames = $bridgeFactory->getBridgeNames();
|
||||
|
||||
$formatFac = new FormatFactory();
|
||||
$formats = $formatFac->getFormatNames();
|
||||
$formatFactory = new FormatFactory();
|
||||
$formats = $formatFactory->getFormatNames();
|
||||
|
||||
$totalBridges = count($bridgeList);
|
||||
$totalBridges = count($bridgeNames);
|
||||
|
||||
foreach ($bridgeList as $bridgeName) {
|
||||
if ($bridgeFac->isWhitelisted($bridgeName)) {
|
||||
foreach ($bridgeNames as $bridgeName) {
|
||||
if ($bridgeFactory->isWhitelisted($bridgeName)) {
|
||||
$body .= BridgeCard::displayBridgeCard($bridgeName, $formats);
|
||||
$totalActiveBridges++;
|
||||
} elseif ($showInactive) {
|
||||
|
@@ -317,9 +317,9 @@ function getSimpleHTMLDOMCached(
|
||||
Debug::log('Caching url ' . $url . ', duration ' . $duration);
|
||||
|
||||
// Initialize cache
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create();
|
||||
$cache = $cacheFactory->create();
|
||||
$cache->setScope('pages');
|
||||
$cache->purgeCache(86400); // 24 hours (forced)
|
||||
|
||||
|
@@ -56,9 +56,9 @@ function returnServerError($message)
|
||||
*/
|
||||
function logBridgeError($bridgeName, $code)
|
||||
{
|
||||
$cacheFac = new CacheFactory();
|
||||
$cacheFactory = new CacheFactory();
|
||||
|
||||
$cache = $cacheFac->create();
|
||||
$cache = $cacheFactory->create();
|
||||
$cache->setScope('error_reporting');
|
||||
$cache->setkey($bridgeName . '_' . $code);
|
||||
$cache->purgeCache(86400); // 24 hours
|
||||
|
Reference in New Issue
Block a user