public static function updateGuids($aGuids) { $logger = new Logger(); $guidsJson = json_encode($aGuids); $updated = FileWriter::writeStringToFile($guidsJson, Config::$rssGuidFileLocation); $message = 'GUIDs updated'; $logLevel = 'info'; if (!$updated) { $message = 'GUIDs not updated'; $logLevel = 'error'; } $logger->log($logLevel, $message); }
public static function updateOutput($rssFeed) { $logger = new Logger(); $jsonString = json_encode($rssFeed); OutputFileHandler::addOutputFileIfNotExists(); $updated = FileWriter::writeStringToFile($jsonString, Config::$rssOutputFileLocation); $message = 'Output updated'; $logLevel = 'info'; if (!$updated) { $message = 'Output not updated'; $logLevel = 'error'; } $logger->log($logLevel, $message); }