isSupportedExtension() isSupportedExtension( $extension) : boolean Test if an extension is supported by the syntax highlighter. Parameters $extension Returns boolean
getMimeType() getMimeType( $file) Find the mime type of a file. Use /etc/mime.types to find the type. Parameters $file
getMimeTypeFromContent() getMimeTypeFromContent( $file, $filedata) : array Find the mime type of a file using the fileinfo class. Parameters $file $filedata Returns array — Mime type found or 'application/octet-stream', basename, extension
isText() isText( $fileinfo) : boolean Find if a given mime type is a text file. This uses the output of the self::getMimeType function. Parameters $fileinfo Returns boolean — Is text