concrete/src/File/Type/TypeList.php
public static function getType($ext)
    {
        $ftl = static::getInstance();
        if (strpos($ext, '.') !== false) {
            // filename
            $app = Application::getFacadeApplication();
            $h = $app->make('helper/file');
            $ext = $h->getExtension($ext);
        }
        $ext = strtolower($ext);
        if (isset($ftl->types[$ext])) {
            return $ftl->types[$ext];
        } else {
            $ft = new FileType(); // generic
            return $ft;
        }
    }
public static function getType($ext)
    {
        $ftl = static::getInstance();
        if (strpos($ext, '.') !== false) {
            // filename
            $app = Application::getFacadeApplication();
            $h = $app->make('helper/file');
            $ext = $h->getExtension($ext);
        }
        $ext = strtolower($ext);
        if (isset($ftl->types[$ext])) {
            return $ftl->types[$ext];
        } else {
            $ft = new FileType(); // generic
            return $ft;
        }
    }
public static function getType ( $ ext ) { $ ftl = static :: getInstance ( ) ; if ( strpos ( $ ext , '.' ) !== false ) { // filename $ app = Application :: getFacadeApplication ( ) ; $ h = $ app -> make ( 'helper/file' ) ; $ ext = $ h -> getExtension ( $ ext ) ; } $ ext = strtolower ( $ ext ) ; if ( isset ( $ ftl -> types [ $ ext ] ) ) { return $ ftl -> types [ $ ext ] ; } else { $ ft = new FileType ( ) ; // generic return $ ft ; } }
Can take an extension or a filename
Returns any registered information we have for the particular file type, based on its registration.

@return FileType
Can take an extension or a filename Returns any registered information we have for the particular file type based on its registration .