diff --git a/app/src/Feed/FeedGenerator.php b/app/src/Feed/FeedGenerator.php index 624b205..337870b 100644 --- a/app/src/Feed/FeedGenerator.php +++ b/app/src/Feed/FeedGenerator.php @@ -3,6 +3,7 @@ namespace Slovocast\Feed; use DOMDocument; +use DOMElement; use Slovocast\Feed\FeedGeneratorInterface; use Slovocast\Domain\Entity\Channel; @@ -13,6 +14,7 @@ class FeedGenerator implements FeedGeneratorInterface public function __construct() { $this->document = new DOMDocument(); + $this->reset(); } /** diff --git a/app/src/Handler/Channel/Episode/UploadEpisodeFileAction.php b/app/src/Handler/Channel/Episode/UploadEpisodeFileAction.php index 5f9b06f..848f301 100644 --- a/app/src/Handler/Channel/Episode/UploadEpisodeFileAction.php +++ b/app/src/Handler/Channel/Episode/UploadEpisodeFileAction.php @@ -35,6 +35,8 @@ class UploadEpisodeFileAction extends Handler $this->filesystem->writeStream($file->getStream()); } + // save the file location to the database somewhere + return $this->json([ 'message' => 'Uploaded Episode file' ]); } catch (FilesystemException | UnableToWriteFile $e) { $this->logger->error($e->getMessage()); diff --git a/app/src/Infrastructure/Application/LoggerSetup.php b/app/src/Infrastructure/Application/LoggerSetup.php new file mode 100644 index 0000000..9e95b52 --- /dev/null +++ b/app/src/Infrastructure/Application/LoggerSetup.php @@ -0,0 +1,24 @@ + function (ContainerInterface $c) { + $logger = new Logger("default"); + $logger->pushHandler(new StreamHandler('php://stdout', Level::Info)); + return $logger; + } + ]; + } +} diff --git a/app/src/Infrastructure/Application/SetupInterface.php b/app/src/Infrastructure/Application/SetupInterface.php new file mode 100644 index 0000000..b73bd91 --- /dev/null +++ b/app/src/Infrastructure/Application/SetupInterface.php @@ -0,0 +1,14 @@ + A function that instantiates the class + */ + public function setup(): array; +}