-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tim Goudriaan <tim@codedmonkey.com>
- Loading branch information
1 parent
c52bfc4
commit 87f1dbf
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Consuming Podcast Feeds | ||
|
||
Several extensions for podcast namespaces are included and enabled by default | ||
when importing a feed through laminas-feed's Reader subcomponent. Podcast feeds | ||
inherit most of their properties from RSS; refer to the "Consuming | ||
RSS Feeds" documentation for details. | ||
|
||
## Basic Use of a Podcast Feed | ||
|
||
Read a Podcast feed and create an audio player for each entry: | ||
|
||
```php | ||
$feed = Laminas\Feed\Reader\Reader::import('http://podcast.example.com/feed/'); | ||
echo '<h1>' . $feed->getTitle() . '</h1>' . "\n\n"; | ||
echo '<p>' . $feed->getSummary() . '</p>' . "\n\n"; | ||
foreach ($feed as $entry) { | ||
echo '<h3>' . $entry->getTitle() . '</h3>' . "\n"; | ||
echo '<p>' . $entry->getSummary() . '</p>' . "\n"; | ||
echo '<audio controls src="' . $entry->getEnclosure()->url . '></audio>'. "\n"; | ||
} | ||
``` | ||
## Get properties | ||
### Podcast Extension properties | ||
The Podcast Extension adds support for the iTunes Podcast specification. | ||
Channel API methods: | ||
Method | Description | ||
------ | ----------- | ||
`getCastAuthor()` | | ||
`getBlock()` | | ||
`getItunesCategories()` | | ||
`getExplicit()` | | ||
`getItunesImage()` | | ||
`getKeywords()` | | ||
`getNewFeedUrl()` | | ||
`getOwner()` | | ||
`getSubtitle()` | | ||
`getSummary()` | | ||
`getPodcastType()` | | ||
`isComplete()` | | ||
Item API methods: | ||
Method | Description | ||
------ | ----------- | ||
`getCastAuthor()` | | ||
`getBlock()` | | ||
`getDuration()` | | ||
`getExplicit()` | | ||
`getKeywords()` | | ||
`getTitle()` | | ||
`getSubtitle()` | | ||
`getSummary()` | | ||
`getItunesImage()` | | ||
`getEpisode()` | | ||
`getEpisodeType()` | | ||
`isClosedCaptioned()` | | ||
`getSeason()` | | ||
### PodcastIndex Extension properties | ||
The PodcastIndex Extension adds support for the Podcast Index specification. | ||
Channel API methods: | ||
Method | Description | ||
------ | ----------- | ||
`isLocked()` | | ||
`getLockOwner()` | | ||
`getFunding()` | | ||
Item API methods: | ||
Method | Description | ||
------ | ----------- | ||
`getTranscript()` | | ||
`getChapters()` | | ||
`getSoundbites()` | | ||
### GooglePlayPodcast Extension properties | ||
The GooglePlayPodcast Extension adds support for the Google Play Podcast | ||
specification. | ||
Channel API methods: | ||
Method | Description | ||
------ | ----------- | ||
`getPlayPodcastAuthor()` | | ||
`getPlayPodcastBlock()` | | ||
`getPlayPodcastCategories()` | | ||
`getPlayPodcastExplicit()` | | ||
`getPlayPodcastImage()` | | ||
`getPlayPodcastDescription()` | | ||
Item API methods: | ||
Method | Description | ||
------ | ----------- | ||
`getPlayPodcastBlock()` | | ||
`getPlayPodcastExplicit()` | | ||
`getPlayPodcastDescription()` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters