Add the templates for the feed and the episode file class

This commit is contained in:
Dave Smith-Hayes 2024-11-11 22:29:24 -05:00
parent af1341fd4a
commit f64468d5c4
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<?php
namespace Slovocast\Domain\Entity\Episode;
/**
* Represents the file for the episode itself.
*/
class File
{
public function __construct(
private string $url,
private int $length,
private string $type
) { }
public function getUrl(): string
{
return $this->url;
}
public function getLength(): int
{
return $this->length;
}
public function getType(): string
{
return $this->type;
}
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"
xmlns:spotify="http://www.spotify.com/ns/rss"
xmlns:media="http://search.yahoo.com/mrss/">
<channel>
{% block channel %}{% endblock %}
{% block image %}{% endblock %}
{# Render each episoe in here #}
{% block episodes %}{% endblock %}
</channel>
</rss>