Exemplo n.º 1
0
 protected function isSupportedMimeType($identifier)
 {
     if (count($this->mimeTypes) <= 0) {
         return true;
     }
     $fileExtension = pathinfo($identifier, PATHINFO_EXTENSION);
     $mimeType = Customweb_Core_MimeType::getMimeType($fileExtension);
     if (in_array($mimeType, $this->mimeTypes)) {
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 2
0
 public function getMimeType()
 {
     if ($this->mimeType === null) {
         $this->mimeType = Customweb_Core_MimeType::getMimeType($this->getFileExtension());
     }
     return $this->mimeType;
 }