src/BoomCMS/FileInfo/FileInfo.php
public function getDriver(string $mimetype)
    {
        foreach ($this->byMimetype as $match => $driver) {
            if ($mimetype === $match) {
                return $driver;
            }
        }

        foreach ($this->byMimeStart as $match => $driver) {
            if (strpos($mimetype, $match) === 0) {
                return $driver;
            }
        }

        return 'DefaultDriver';
    }
public function getDriver(string $mimetype)
    {
        foreach ($this->byMimetype as $match => $driver) {
            if ($mimetype === $match) {
                return $driver;
            }
        }

        foreach ($this->byMimeStart as $match => $driver) {
            if (strpos($mimetype, $match) === 0) {
                return $driver;
            }
        }

        return 'DefaultDriver';
    }
public function getDriver ( string $ mimetype ) { foreach ( $ this -> byMimetype as $ match => $ driver ) { if ( $ mimetype === $ match ) { return $ driver ; } } foreach ( $ this -> byMimeStart as $ match => $ driver ) { if ( strpos ( $ mimetype , $ match ) === 0 ) { return $ driver ; } } return 'DefaultDriver' ; }
Determines which driver to use for a given mimetype.

@param string $mimetype

@return string
Determines which driver to use for a given mimetype .