dev-master
9999999-dev https://github.com/imnotjames/syndicatorParse and serialize syndicated feeds.
MIT
The Requires
- php >=5.3
The Development Requires
by James Ward
xml atom rss feeds podcast
Wallogit.com
2017 © Pedro Peláez
Parse and serialize syndicated feeds.
Currently Supported Standards:, (*2)
For any others feel free to open an issue., (*3)
The easiest method of installation is with composer, on packagist., (*4)
Composition of Syndication feeds:, (*5)
use imnotjames\Syndicator\Article;
use imnotjames\Syndicator\Feed;
use imnotjames\Syndicator\Logo;
use imnotjames\Syndicator\Serializers\RSSXML;
$feed = new Feed(
'My Rad Feed',
'This feed is the coolest feed out there.',
'https://github.com/imnotjames/syndicator'
);
$feed->setLogo(new Logo('http://i.imgur.com/haED2k7.jpg'));
$feed->setGenerator('Coolness Generator v95000');
$feed->setCacheTimeToLive(42);
$article = new Article();
$article->setTitle('How to be cool');
$article->setDescription('Step 1. Be cool. Step 2. Don\'t be not cool.');
$article->setURI('http://example.com/blog/how-to-be-cool');
$feed->addArticle($article);
$serializer = new RSSXML();
$xml = $serializer->serialize($feed);
And decomposition:, (*6)
use imnotjames\Syndicator\Parsers\RSSXML;
$parser = new RSSXML();
$feed = $parser->parse(file_get_contents('awesome_feed.xml'));
printf("Title: %s\n\n", $feed->getTitle());
echo "Articles:\n";
foreach ($feed as $article) {
printf("\tTitle: %s", $article->getTitle());
echo "\n";
}
MIT License, (*7)
Parse and serialize syndicated feeds.
MIT
xml atom rss feeds podcast