Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Provide extensions to support Google Play Podcasts DTD#78

Merged
weierophinney merged 3 commits intozendframework:developfromweierophinney:feature/67-google-podcast
May 24, 2018
Merged

Provide extensions to support Google Play Podcasts DTD#78

weierophinney merged 3 commits intozendframework:developfromweierophinney:feature/67-google-podcast
May 24, 2018

Conversation

@weierophinney
Copy link
Member

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:

namespaceZend\Feed\Reader\Extension\GooglePlayPodcast;class Entry{/**    * Get googleplay:block value    */publicfunctiongetPlayPodcastBlock() :string;/**    * Get googleplay:explicit value    */publicfunctiongetPlayPodcastExplicit() : ?string;/**    * Get the googleplay:description value    */publicfunctiongetPlayPodcastDescription() :string;}class Feed{/**    * Get the googleplay:author value    */publicfunctiongetPlayPodcastAuthor() :string;/**    * Get the googleplay:block value    */publicfunctiongetPlayPodcastBlock() :string;/**    * Get the googleplay:category values    */publicfunction getPlayPodcastCategories() : ?array/**    * Get the googleplay:explicit value    */   publicfunction getPlayPodcastExplicit() : ?string/**    * Get the googleplay:image@href value    */publicfunctiongetPlayPodcastImage() :string/**    * Get the googleplay:description value    */   publicfunction getPlayPodcastDescription() : string;}
namespaceZend\Feed\Writer\Extension\GooglePlayPodcast;class Entry{/**    * Sets the googleplay:block value    */publicfunctionsetPlayPodcastBlock(string$value) :self;/**    * Sets the googleplay:explicit value    */publicfunctionsetPlayPodcastExplicit(string$value) :self;/**    * Sets the googleplay:description value    */publicfunctionsetPlayPodcastDescription(string$value) :self;}class Feed{/**    * Sets the googleplay:block value    */publicfunctionsetPlayPodcastBlock(string$value) :self;/**    * Add feed authors (googleplay:author)    */publicfunctionaddPlayPodcastAuthors(array$values) :self;/**    * Add a feed author (googleplay:author)    */publicfunctionaddPlayPodcastAuthor(string$value) :self;/**    * Set feed categories (googleplay:category)    */publicfunctionsetPlayPodcastCategories(array$values) :self;/**    * Set googleplay:image value    */publicfunctionsetPlayPodcastImage(string$value) :self;/**    * Set googleplay:explicit value    */publicfunctionsetPlayPodcastExplicit(string$value) :self;/**    * Set googleplay:description value    */publicfunctionsetPlayPodcastDescription(string$value) :self;}

The new extensions are registered by default in their respective subcomponents.

Fixes#67

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.
@weierophinneyweierophinney merged commit30d1fb6 intozendframework:developMay 24, 2018
weierophinney added a commit that referenced this pull requestMay 24, 2018
@weierophinneyweierophinney deleted the feature/67-google-podcast branchMay 24, 2018 20:33
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@weierophinney

[8]ページ先頭

©2009-2025 Movatter.jp