It’s been a couple of months since I posted. But action is still going on behind the scenes. Seymour is actually just one element of a bigger project I’m currently working on.
It has now been running on my test server aggregating a few hundred blogs for about 2 months now. With no real problems.
I’ve also made some minor improvements based on feedback. All the getBlah() functions should now return sensible defaults if the feed hasn’t explicitely included that element, which makes your code a little cleaner.
For example a call to fetch the categories of an entry like this…
foreach($entry->getCategories() as $cat) {
// do something with the category
}
…will now return an empty array rather than null, so you no longer have to test for the existence of everything before trying to use it. Similarly, calls that you’d expect to return strings will now just return empty strings if the element doesn’t exist in the feed.
And even calls which return objects will now return a blank version of the object. This helps make your code much simpler. For example if you wanted to get the email address of the author of a feed, you would previously have had to test that the feed had included the author’s details first:
$author = $feed->getMainAuthor();
if ($author) {
$email = $author->getEmail();
}
Now you can simply do this…
$author = $feed->getMainAuthor();
$email = $author->getEmail();
…and if no author details have been included in the feed, $email is just an empty string. Before you would have got a ‘access member function of a non-object’ error.
These improvements are in the latest CVS version on Sourceforge.