diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index ce376d8..f5adc76 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1,51 +1,4 @@
[
- {
- "name": "suin/php-rss-writer",
- "version": "1.2",
- "version_normalized": "1.2.0.0",
- "source": {
- "type": "git",
- "url": "git://github.com/suin/php-rss-writer.git",
- "reference": "1.2"
- },
- "dist": {
- "type": "zip",
- "url": "https://github.com/suin/php-rss-writer/zipball/1.2",
- "reference": "1.2",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "time": "2012-08-23 00:45:18",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "Suin\\RSSWriter": "Source"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "suin",
- "email": "suinyeze@gmail.com",
- "homepage": "https://www.facebook.com/suinyeze",
- "role": "Developer, Renaming Specialist"
- }
- ],
- "description": "Yet another simple RSS writer library for PHP 5.3 or later.",
- "homepage": "https://github.com/suin/php-rss-writer",
- "keywords": [
- "feed",
- "generator",
- "rss",
- "writer"
- ]
- },
{
"name": "michelf/php-markdown",
"version": "dev-lib",
@@ -98,5 +51,52 @@
"keywords": [
"markdown"
]
+ },
+ {
+ "name": "suin/php-rss-writer",
+ "version": "1.3",
+ "version_normalized": "1.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/suin/php-rss-writer.git",
+ "reference": "82812ff988bb470f746d24e153cdc138e8838ff3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/suin/php-rss-writer/zipball/82812ff988bb470f746d24e153cdc138e8838ff3",
+ "reference": "82812ff988bb470f746d24e153cdc138e8838ff3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "time": "2014-03-12 06:05:28",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Suin\\RSSWriter": "Source"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "suin",
+ "email": "suinyeze@gmail.com",
+ "homepage": "https://www.facebook.com/suinyeze",
+ "role": "Developer, Renaming Specialist"
+ }
+ ],
+ "description": "Yet another simple RSS writer library for PHP 5.3 or later.",
+ "homepage": "https://github.com/suin/php-rss-writer",
+ "keywords": [
+ "feed",
+ "generator",
+ "rss",
+ "writer"
+ ]
}
]
diff --git a/vendor/suin/php-rss-writer/README.md b/vendor/suin/php-rss-writer/README.md
index fb58cb1..5c7fa7f 100644
--- a/vendor/suin/php-rss-writer/README.md
+++ b/vendor/suin/php-rss-writer/README.md
@@ -2,6 +2,8 @@
`\Suin\RSSWriter` is yet another simple RSS writer library for PHP 5.3 or later. This component is Licensed under MIT license.
+This library can also be used to publish Podcasts.
+
The build status of the current master branch is tracked by Travis CI: [](http://travis-ci.org/suin/php-rss-writer)
@@ -18,6 +20,7 @@ $channel
->url('http://blog.example.com')
->appendTo($feed);
+// RSS item
$item = new Item();
$item
->title("Blog Entry Title")
@@ -25,6 +28,15 @@ $item
->url('http://blog.example.com/2012/08/21/blog-entry/')
->appendTo($channel);
+// Podcast item
+$item = new Item();
+$item
+ ->title("Some Podcast Entry")
+ ->description("
Podcast body
")
+ ->url('http://podcast.example.com/2012/08/21/podcast-entry/')
+ ->enclosure('http://link-to-audio-file.com/2013/08/21/podcast.mp3', 4889, 'audio/mpeg')
+ ->appendTo($channel);
+
echo $feed;
```
@@ -81,4 +93,4 @@ If you want to know APIs, please see `FeedInterface`, `ChannelInterface` and `It
## License
-MIT license
\ No newline at end of file
+MIT license
diff --git a/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/Item.php b/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/Item.php
index cf991c0..9ee7ee4 100644
--- a/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/Item.php
+++ b/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/Item.php
@@ -20,6 +20,8 @@ class Item implements \Suin\RSSWriter\ItemInterface
protected $isPermalink;
/** @var int */
protected $pubDate;
+ /** @var array */
+ protected $enclosure;
/**
* Set item title
@@ -90,6 +92,19 @@ class Item implements \Suin\RSSWriter\ItemInterface
return $this;
}
+ /**
+ * Set enclosure
+ * @param var $url Url to media file
+ * @param int $length Length in bytes of the media file
+ * @param var $type Media type, default is audio/mpeg
+ * @return $this
+ */
+ public function enclosure($url, $length = 0, $type = 'audio/mpeg')
+ {
+ $this->enclosure = array('url' => $url, 'length' => $length, 'type' => $type);
+ return $this;
+ }
+
/**
* Append item to the channel
* @param \Suin\RSSWriter\ChannelInterface $channel
@@ -137,6 +152,18 @@ class Item implements \Suin\RSSWriter\ItemInterface
$xml->addChild('pubDate', date(DATE_RSS, $this->pubDate));
}
+
+ if (is_array($this->enclosure) && (count($this->enclosure) == 3))
+ {
+ $element = $xml->addChild('enclosure');
+ $element->addAttribute('url', $this->enclosure['url']);
+ $element->addAttribute('type', $this->enclosure['type']);
+
+ if ($this->enclosure['length'])
+ {
+ $element->addAttribute('length', $this->enclosure['length']);
+ }
+ }
return $xml;
}
}
diff --git a/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/ItemInterface.php b/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/ItemInterface.php
index 7584528..d25bc94 100644
--- a/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/ItemInterface.php
+++ b/vendor/suin/php-rss-writer/Source/Suin/RSSWriter/ItemInterface.php
@@ -51,6 +51,15 @@ interface ItemInterface
*/
public function pubDate($pubDate);
+ /**
+ * Set enclosure
+ * @param var $url Url to media file
+ * @param int $length Length in bytes of the media file
+ * @param var $type Media type, default is audio/mpeg
+ * @return $this
+ */
+ public function enclosure($url, $length = 0, $type = 'audio/mpeg');
+
/**
* Append item to the channel
* @param \Suin\RSSWriter\ChannelInterface $channel
diff --git a/vendor/suin/php-rss-writer/Tests/Suin/RSSWriter/ItemTest.php b/vendor/suin/php-rss-writer/Tests/Suin/RSSWriter/ItemTest.php
index dbf30c8..b9bfd14 100644
--- a/vendor/suin/php-rss-writer/Tests/Suin/RSSWriter/ItemTest.php
+++ b/vendor/suin/php-rss-writer/Tests/Suin/RSSWriter/ItemTest.php
@@ -88,6 +88,15 @@ class ItemTest extends \XoopsUnit\TestCase
$this->assertSame($item, $item->appendTo($channel));
}
+ public function testEnclosure()
+ {
+ $url = uniqid();
+ $enclosure = array('url' => $url, 'length' => 0, 'type' => 'audio/mpeg');
+ $item = new Item();
+ $this->assertSame($item, $item->enclosure($url));
+ $this->assertAttributeSame($enclosure, 'enclosure', $item);
+ }
+
public function testAsXML()
{
$now = time();
@@ -104,6 +113,10 @@ class ItemTest extends \XoopsUnit\TestCase
'guid' => "http://inessential.com/2002/09/01.php#a2",
'isPermalink' => true,
'pubDate' => $now,
+ 'enclosure' => array(
+ 'url' => 'http://link-to-audio-file.com/test.mp3',
+ 'length' => 4992,
+ 'type' => 'audio/mpeg')
);
$item = new Item();
@@ -122,6 +135,7 @@ class ItemTest extends \XoopsUnit\TestCase
{$data['categories'][1][0]}
{$data['guid']}
{$nowString}
+
";
$this->assertXmlStringEqualsXmlString($expect, $item->asXML()->asXML());
@@ -133,7 +147,7 @@ class ItemTest extends \XoopsUnit\TestCase
$nowString = date(DATE_RSS, $now);
$data = array(
- 'title' => "日本語",
+ 'title' => "Venice Film Festival",
'url' => 'http://nytimes.com/2004/12/07FEST.html',
'description' => "Some of the most heated chatter at the Venice Film Festival this week was about the way that the arrival of the stars at the Palazzo del Cinema was being staged.",
);