public function getHandlerByFile(File $file) { if (!($type = $this->getFileType($file))) { throw new UnknownTypeException(); } return $this->getHandler($type); }