/** * @param Mime $mime * @return string * * @throws BadConfigurationException */ public function get(Mime $mime) { return $this->result($mime->getFileType()); }
/** * Is current file an image * * @return bool */ public function isImage() { return $this->mime->isImage(); }
/** * 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')); }