Add some basic feed generation when I should work on episode models.
This commit is contained in:
parent
7fd5798454
commit
5b0cef92ba
44
app/composer.lock
generated
44
app/composer.lock
generated
@ -2822,16 +2822,16 @@
|
||||
},
|
||||
{
|
||||
"name": "robmorgan/phinx",
|
||||
"version": "0.16.5",
|
||||
"version": "0.16.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/cakephp/phinx.git",
|
||||
"reference": "31d837c17d6dc294d44f0b17331066548ac8c032"
|
||||
"reference": "5bad10934336e8cf45d50d529cabfcbe7fe287c5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/cakephp/phinx/zipball/31d837c17d6dc294d44f0b17331066548ac8c032",
|
||||
"reference": "31d837c17d6dc294d44f0b17331066548ac8c032",
|
||||
"url": "https://api.github.com/repos/cakephp/phinx/zipball/5bad10934336e8cf45d50d529cabfcbe7fe287c5",
|
||||
"reference": "5bad10934336e8cf45d50d529cabfcbe7fe287c5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2903,9 +2903,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/cakephp/phinx/issues",
|
||||
"source": "https://github.com/cakephp/phinx/tree/0.16.5"
|
||||
"source": "https://github.com/cakephp/phinx/tree/0.16.6"
|
||||
},
|
||||
"time": "2024-10-03T15:41:04+00:00"
|
||||
"time": "2024-12-20T23:02:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "slim/flash",
|
||||
@ -3409,12 +3409,12 @@
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/contracts",
|
||||
"name": "symfony/contracts"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-main": "3.5-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -4021,12 +4021,12 @@
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/contracts",
|
||||
"name": "symfony/contracts"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-main": "3.5-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
"url": "https://github.com/symfony/contracts"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -5356,16 +5356,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "11.5.1",
|
||||
"version": "11.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a"
|
||||
"reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2b94d4f2450b9869fa64a46fd8a6a41997aef56a",
|
||||
"reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/153d0531b9f7e883c5053160cad6dd5ac28140b3",
|
||||
"reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5379,13 +5379,13 @@
|
||||
"phar-io/manifest": "^2.0.4",
|
||||
"phar-io/version": "^3.2.1",
|
||||
"php": ">=8.2",
|
||||
"phpunit/php-code-coverage": "^11.0.7",
|
||||
"phpunit/php-code-coverage": "^11.0.8",
|
||||
"phpunit/php-file-iterator": "^5.1.0",
|
||||
"phpunit/php-invoker": "^5.0.1",
|
||||
"phpunit/php-text-template": "^4.0.1",
|
||||
"phpunit/php-timer": "^7.0.1",
|
||||
"sebastian/cli-parser": "^3.0.2",
|
||||
"sebastian/code-unit": "^3.0.1",
|
||||
"sebastian/code-unit": "^3.0.2",
|
||||
"sebastian/comparator": "^6.2.1",
|
||||
"sebastian/diff": "^6.0.2",
|
||||
"sebastian/environment": "^7.2.0",
|
||||
@ -5437,7 +5437,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.1"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -5453,7 +5453,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-12-11T10:52:48+00:00"
|
||||
"time": "2024-12-21T05:51:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
32
app/src/Feed/FeedGenerator.php
Normal file
32
app/src/Feed/FeedGenerator.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Slovocast\Feed;
|
||||
|
||||
use DOMDocument;
|
||||
use Slovocast\Feed\FeedGeneratorInterface;
|
||||
use Slovocast\Domain\Entity\Channel;
|
||||
|
||||
class FeedGenerator implements FeedGeneratorInterface
|
||||
{
|
||||
protected DOMDocument $document;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->document = new DOMDocument();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the buffered DOMDocument object when building the Feed.
|
||||
*/
|
||||
protected function reset(): void
|
||||
{
|
||||
$this->document = new DOMDocument();
|
||||
$rss = $this->document->createElement("rss");
|
||||
|
||||
}
|
||||
|
||||
public function generate(Channel $channel): DOMDocument
|
||||
{
|
||||
|
||||
}
|
||||
}
|
25
app/src/Feed/FeedGeneratorInterface.php
Normal file
25
app/src/Feed/FeedGeneratorInterface.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Slovocast\Feed;
|
||||
|
||||
use DOMDocument;
|
||||
use Slovocast\Domain\Entity\Channel;
|
||||
|
||||
interface FeedGeneratorInterface
|
||||
{
|
||||
/**
|
||||
* XMLNS Definitions that should be updated as new namespaces get added.
|
||||
* This could probably be defines somewhere else if we need it. These are
|
||||
* pulled from some old Podbean feeds.
|
||||
*/
|
||||
const XMLNS_CONTENT="http://purl.org/rss/1.0/modules/content/";
|
||||
const XMLNS_WFW="http://wellformedweb.org/CommentAPI";
|
||||
const XMLNS_DC="http://purl.org/dv/elements/1.1/";
|
||||
const XMLNS_ATOM="http://www.w3.org/2005/Atom";
|
||||
const XMLNS_ITUNES="http://www.itunes.com/dtds/podcast-1.0.dtd";
|
||||
const XMLNS_GOOGLEPLAY="http://www.google.com/schemas/play-podcasts/1.0";
|
||||
const XMLNS_SPOTIFY="https://www.spotify.com/ns/rss";
|
||||
const XMLNS_MEDAI="http://search.yahoo.com/mrss/";
|
||||
|
||||
public function generate(Channel $channel): DOMDocument;
|
||||
}
|
Loading…
Reference in New Issue
Block a user