Xpressengine\Media\MediaManager::getHandlerByFile PHP Method

getHandlerByFile() public method

Returns handler by storage File instance
public getHandlerByFile ( File $file ) : AbstractHandler
$file Xpressengine\Storage\File file instance
return Xpressengine\Media\Handlers\AbstractHandler
    public function getHandlerByFile(File $file)
    {
        if (!($type = $this->getFileType($file))) {
            throw new UnknownTypeException();
        }
        return $this->getHandler($type);
    }