diego-brocanelli / podcast-rss-reader
component for easy handling and management of rss feed for podcasts.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Type:component
Requires
- php: >=7.4
- laminas/laminas-feed: ^2.14
- laminas/laminas-http: ^2.14
Requires (Dev)
- phpstan/phpstan: ^0.12.55
- phpunit/phpunit: ^9.4
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2025-02-20 22:56:47 UTC
README
Component for easy handling and management of rss feed for podcasts.
How to use
Requirements
PHP >= 7.4.
Instalation
composer require diego-brocanelli/podcast-rss-reader dev-main
How to contribute
Open an issue exposing your point to be analyzed, including detailing the point.
To contribute to the project, create a fork and send your pull request.
Tests
composer tests
Code Analysis
The command below will run PHPStan level 8 analysis.
composer analyse
PHP Code Sniffer
The command below will run PHPStan level 8 analysis.
composer phpcs
Test, Code Analysis and PHP Code Sniffer
composer all
Example
<?php require_once __DIR__.'/vendor/autoload.php'; use DiegoBrocanelli\Podcast\Podcast; use DiegoBrocanelli\Podcast\Reader; $feed = 'https://devnaestrada.com.br/feed.xml'; $podcast = new Podcast( new Reader($feed) ); $podcast->getEpisodes(); //Return: array<Episodes>
Methods
info(): array
Responsible for returning the base data of the rss feed, with the exception of episodes.
getImageInfo()
Responsible for returning the DiegoBrocanelli\Podcast\Image
object with its attributes.
getEpisodes()
Responsible for returning a list of DiegoBrocanelli\Podcast\Episode
objects with their attributes.
lastBuildDate()
Responsible for returning the date for the last episode released, returning a DateTime object
.
biggerThen(DateTime $date): array
Allows you to set a date to search for episodes. Bringing all records located from the date informed.