示例#1
0
 function compatible(&$Medium)
 {
     if ($this->_which(array('gs', 'gswin32c'))) {
         /* Check for ghostscript */
         $this->require['mimeTypes'][] = 'application/pdf';
     }
     return parent::compatible($Medium);
 }
示例#2
0
文件: gd.php 项目: rchavik/media
 function compatible($Medium)
 {
     $types = imageTypes();
     if ($types & IMG_GIF) {
         $this->require['mimeTypes'][] = 'image/gif';
     }
     if ($types & IMG_JPG) {
         $this->require['mimeTypes'][] = 'image/jpeg';
     }
     if ($types & IMG_PNG) {
         $this->require['mimeTypes'][] = 'image/png';
     }
     if ($types & IMG_WBMP) {
         $this->require['mimeTypes'][] = 'image/wbmp';
     }
     if ($types & IMG_XPM) {
         $this->require['mimeTypes'][] = 'image/xpm';
     }
     return parent::compatible($Medium);
 }