Example #1
0
 /**
  * @param Mime $mime
  * @return string
  *
  * @throws BadConfigurationException
  */
 public function get(Mime $mime)
 {
     return $this->result($mime->getFileType());
 }
Example #2
0
 /**
  * Is current file an image
  *
  * @return bool
  */
 public function isImage()
 {
     return $this->mime->isImage();
 }
Example #3
0
 /**
  * Initialise new instance of Folder service
  *
  * @param Url $url
  * @param FolderDto $folder
  * @param Mime $mime
  * @param Icon $icon
  */
 public function __construct(Url $url, FolderDto $folder, Mime $mime, Icon $icon)
 {
     $this->url = $url;
     $this->folder = $folder;
     $this->folder->thumb = $icon->get($mime->setMime('dir'));
 }