Hello Alexander,
Thank you for your response!
You are correct that Feed Parsing is not such a common module in php
applications.
The need definitely originated from a personal experience where i had 2
apps using a library that i had to change to another.
I would say that an objective argument would be that there is a stable
specification for RSS structure.
On Friday, March 1, 2019 at 12:54:20 PM UTC+2, Alexander Makarov wrote:
>
> Hello Gabriel,
>
> Thanks for proposal but overall it doesn't sound like Feed Parsing is
> common enough task and that there's a need for parsers to be inter-operable.
>
> If you have examples of different parsers and the need to exchange them or
> build re-usable components around them, feel free to discuss.
>
> On Friday, March 1, 2019 at 12:51:25 PM UTC+3, Gabriel Solomon wrote:
>>
>> Hi there PHP-FIG comunity!
>>
>> I hope that my search of this topic has been successful and i have not
>> missed if this topic has been discussed before.
>>
>> I was wondering what would you think about a standard for Feed Parser
>> libraries.
>> I think that most of them follow the same path, but there are some small
>> differences that might get aligned if there is a standard.
>>
>> Bellow i have put a few lines of code of what it might look like
>>
>> interface FeedInterface extends Iterator, Countable
>> {
>> /**
>> * Get a single author
>> *
>> * @param int $index
>> * @return string|null
>> */
>> public function getAuthor($index = 0);
>>
>> /**
>> * Get an array with feed authors
>> *
>> * @return array
>> */
>> public function getAuthors();
>>
>> /**
>> * Get the copyright entry
>> *
>> * @return string|null
>> */
>> public function getCopyright();
>>
>> /**
>> * Get the feed creation date
>> *
>> * @return \DateTime|null
>> */
>> public function getDateCreated();
>>
>> /**
>> * Get the feed modification date
>> *
>> * @return \DateTime|null
>> */
>> public function getDateModified();
>>
>> /**
>> * Get the feed description
>> *
>> * @return string|null
>> */
>> public function getDescription();
>>
>> /**
>> * Get the feed ID
>> *
>> * @return string|null
>> */
>> public function getId();
>>
>> /**
>> * Get the feed language
>> *
>> * @return string|null
>> */
>> public function getLanguage();
>>
>> /**
>> * Get a link to the HTML source
>> *
>> * @return string|null
>> */
>> public function getLink();
>>
>> /**
>> * Get a link to the XML feed
>> *
>> * @return string|null
>> */
>> public function getFeedLink();
>>
>> /**
>> * Get the feed title
>> *
>> * @return string|null
>> */
>> public function getTitle();
>> }
>>
>> interface EntryInterface
>> {
>> /**
>> * Get the specified author
>> *
>> * @param int $index
>> * @return string|null
>> */
>> public function getAuthor($index = 0);
>>
>> /**
>> * Get an array with feed authors
>> *
>> * @return array
>> */
>> public function getAuthors();
>>
>> /**
>> * Get the entry content
>> *
>> * @return string
>> */
>> public function getContent();
>>
>> /**
>> * Get the entry creation date
>> *
>> * @return \DateTime
>> */
>> public function getDateCreated();
>>
>> /**
>> * Get the entry modification date
>> *
>> * @return \DateTime
>> */
>> public function getDateModified();
>> }
>>
>>
>>
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/718d0087-54b1-4a86-a952-755001dcd7e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.