Add the templates for the feed and the episode file class
This commit is contained in:
parent
af1341fd4a
commit
f64468d5c4
30
app/src/Domain/Entity/Episode/File.php
Normal file
30
app/src/Domain/Entity/Episode/File.php
Normal 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;
|
||||
}
|
||||
}
|
20
app/templates/feed/skeleton.xml.twig
Normal file
20
app/templates/feed/skeleton.xml.twig
Normal 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>
|
Loading…
Reference in New Issue
Block a user