mibe / FeedWriter

PHP Universal Feed Generator

Home Page:http://ajaxray.com/blog/php-universal-feed-generator-supports-rss-10-rss-20-and-atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactoring Suggestion

FreebieStock opened this issue · comments

Each feed type should be a separate class, instead of checking all the time what type of feed it is:

if($type == 'RSS 1')
...
elseif($type == 'RSS 2')

elseif($type == 'Atom')

This is not the OOP way.

You're right, this is indeed not the OOP way. There's some discussion on this topic in #3 also.
Patches are always welcome. 😄