FeedWriter\Feed::getMIMEType PHP Méthode

getMIMEType() public méthode

Get the appropriate MIME type string for the current feed.
public getMIMEType ( ) : string
Résultat string The MIME type string.
    public function getMIMEType()
    {
        switch ($this->version) {
            case Feed::RSS2:
                $mimeType = "application/rss+xml";
                break;
            case Feed::RSS1:
                $mimeType = "application/rdf+xml";
                break;
            case Feed::ATOM:
                $mimeType = "application/atom+xml";
                break;
            default:
                $mimeType = "text/xml";
        }
        return $mimeType;
    }