示例#1
0
 private static function extractOutputContentType($uri)
 {
     if (preg_match('@\\.([a-z0-9]+)$@i', $uri, $regs)) {
         try {
             return ContentType::byExtention($regs[1]);
         } catch (ContentType\Exception $e) {
         }
     }
     return null;
 }
示例#2
0
 private static function factory($ext = 'jpg')
 {
     return new Factory(file_get_contents(__FILE__), ContentType::byExtention($ext));
 }