2017 © Pedro Peláez
 

library php-rss-writer

Optimized RSS writer

image

utlime/php-rss-writer

Optimized RSS writer

  • Wednesday, July 5, 2017
  • by utlime
  • Repository
  • 1 Watchers
  • 1 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

php-rss-writer

Optimized RSS writer, which based on Iterator interface. This allow to implement Lazy Load pattern., (*1)

Specification

https://validator.w3.org/feed/docs/rss2.html, (*2)

Installation

You can install directly via Composer:, (*3)

$ composer require "utlime/php-rss-writer":"^1.0"

Example

examples/example.php, (*4)

setTitle($prefix . ' title' . $i);

        yield $item;
    }
};

$channel_iterator = function () use ($item_iterator) {
    for ($i = 0; $i setItems($item_iterator('channel' . $i));

        yield $channel;
    }
};

$output = function ($string) {
    echo $string . "\r\n";
};

$rss = new \Utlime\RSS\RSS();
$rss->setChannels($channel_iterator());

$writer = new Utlime\RSS\Writer($output);
$writer->write($rss);
```

# Feed format
```xml

<rss version="2.0">
    <channel>
        <title></title>
        <link></link>
        <description></description>
        <language></language>
        <copyright></copyright>
        <pubDate></pubDate>
        <lastBuildDate></lastBuildDate>
        <category></category>
        <ttl></ttl>
        <item>
            <title></title>
            <link></link>
            <description></description>
            <category></category>
            <guid></guid>
            <pubDate></pubDate>
            <enclosure></enclosure>
        </item>
    </channel>
</rss>

How to test

$ composer install --dev
$ vendor/bin/phpunit

License

MIT license, (*5)

The Versions

05/07 2017

dev-master

9999999-dev

Optimized RSS writer

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

by Alexander Vysotsky

php generator feed rss writer rss 2.0

05/07 2017

1.1.0

1.1.0.0

Optimized RSS writer

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

by Alexander Vysotsky

php generator feed rss writer rss 2.0

02/07 2017

1.0.1

1.0.1.0

Optimized RSS writer

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

by Alexander Vysotsky

php generator feed rss writer rss 2.0

02/07 2017

1.0.0

1.0.0.0

Optimized RSS writer

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

by Alexander Vysotsky