public function getExtensionByType($type)
    {
        if ($this->isValidType($type)) {
            return $this->mime[$type];
        } else {
            throw new RuntimeException(sprintf('Invalid type "%s" supplied', $type));
        }
    }
public function getExtensionByType($type)
    {
        if ($this->isValidType($type)) {
            return $this->mime[$type];
        } else {
            throw new RuntimeException(sprintf('Invalid type "%s" supplied', $type));
        }
    }
public function getExtensionByType ( $ type ) { if ( $ this -> isValidType ( $ type ) ) { return $ this -> mime [ $ type ] ; } else { throw new RuntimeException ( sprintf ( 'Invalid type "%s" supplied' , $ type ) ) ; } }
Finds associated extension by its type

@param string $type
@throws \RuntimeException if unknown type supplied
@return string
Finds associated extension by its type