public static function getByAccountName($service, $name, $limit = 0, $prefix = 'Pop\\Feed\\Format\\')
{
$formats = array('Atom', 'Json', 'Php', 'Rss');
$service = ucfirst(strtolower($service));
$class = null;
foreach ($formats as $format) {
if (class_exists($prefix . $format . '\\' . $service)) {
$class = $prefix . $format . '\\' . $service;
}
}
if (null === $class) {
throw new Exception('Error: The class for that service feed could not be found.');
}
return new self(new $class(array('name' => $name), $limit));
}