This repository was archived by the owner on Jan 30, 2020. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork40
Provide extensions to support Google Play Podcasts DTD#78
Merged
weierophinney merged 3 commits intozendframework:developfromweierophinney:feature/67-google-podcastMay 24, 2018
Merged
Provide extensions to support Google Play Podcasts DTD#78
weierophinney merged 3 commits intozendframework:developfromweierophinney:feature/67-google-podcastMay 24, 2018
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or 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
This patch provides support for reading elements defined in the GooglePlay Podcasts 1.0 DTD. Specifically, it defines the following twoclasses with the noted methods:```phpnamespace Zend\Feed\Reader\Extension\GooglePlayPodcast;class Entry{ /** * Get googleplay:block value */ public function getPlayPodcastBlock() : string; /** * Get googleplay:explicit value */ public function getPlayPodcastExplicit() : ?string; /** * Get the googleplay:description value */ public function getPlayPodcastDescription() : string;}class Feed{ /** * Get the googleplay:author value */ public function getPlayPodcastAuthor() : string; /** * Get the googleplay:block value */ public function getPlayPodcastBlock() : string; /** * Get the googleplay:category values */ public function getPlayPodcastCategories() : ?array /** * Get the googleplay:explicit value */ public function getPlayPodcastExplicit() : ?string /** * Get the googleplay:image@href value */ public function getPlayPodcastImage() : string /** * Get the googleplay:description value */ public function getPlayPodcastDescription() : string;}```The extension is now registered by default both with extension managersand `Reader`.Adds the Writer extension `GooglePlayPodcast`, defining the followingtwo classes:```phpnamespace Zend\Feed\Writer\Extension\GooglePlayPodcast;class Entry{ /** * Sets the googleplay:block value */ public function setPlayPodcastBlock(string $value) : self; /** * Sets the googleplay:explicit value */ public function setPlayPodcastExplicit(string $value) : self; /** * Sets the googleplay:description value */ public function setPlayPodcastDescription(string $value) : self;}class Feed{ /** * Sets the googleplay:block value */ public function setPlayPodcastBlock(string $value) : self; /** * Add feed authors (googleplay:author) */ public function addPlayPodcastAuthors(array $values) : self; /** * Add a feed author (googleplay:author) */ public function addPlayPodcastAuthor(string $value) : self; /** * Set feed categories (googleplay:category) */ public function setPlayPodcastCategories(array $values) : self; /** * Set googleplay:image value */ public function setPlayPodcastImage(string $value) : self; /** * Set googleplay:explicit value */ public function setPlayPodcastExplicit(string $value) : self; /** * Set googleplay:description value */ public function setPlayPodcastDescription(string $value) : self;}```The `Zend\Feed\Writer\Extension\GooglePlayPodcast\Renderer` classes havebeen updated to emit these values as well.Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch creates both reader and writer extensions for consuming and producing RSS feeds that use the Google Play Podcasts DTD (http://www.google.com/schemas/play-podcasts/1.0).
In particular, it exposes the following:
The new extensions are registered by default in their respective subcomponents.
Fixes#67