public function printFeed($useGenericContentType = false)
{
if (!is_bool($useGenericContentType)) {
throw new \InvalidArgumentException('The useGenericContentType parameter must be boolean.');
}
$contentType = "text/xml";
if (!$useGenericContentType) {
$contentType = $this->getMIMEType();
}
// Generate the feed before setting the header, so Exceptions will be nicely visible.
$feed = $this->generateFeed();
header("Content-Type: " . $contentType . "; charset=" . $this->encoding);
echo $feed;
}