Prepare 0.6.0
[shpub.git] / src / shpub / Util.php
1 <?php
2 namespace shpub;
3
4 class Util
5 {
6     /**
7      * Get the MIME content type from a HTTP response
8      *
9      * @param object $res HTTP response
10      *
11      * @return string MIME type without comments
12      */
13     public static function getMimeType(\HTTP_Request2_Response $res)
14     {
15         list($type, ) = explode(';', $res->getHeader('content-type'));
16         return trim($type);
17     }
18 }