| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Simulation of Microsoft Internet Explorer's MIME type detection algorithm.
| File Size: | 851 lines (26 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
IEContentAnalyzer:: (9 methods):
__construct()
getRealMimesFromData()
translateMimeType()
getMimesFromData()
getMimeTypeForVersion()
checkTextHeaders()
checkBinaryHeaders()
sampleData()
getDataFormat()
Class: IEContentAnalyzer - X-Ref
This class simulates Microsoft Internet Explorer's terribly broken and| __construct() X-Ref |
| No description |
| getRealMimesFromData( $fileName, $chunk, $proposed ) X-Ref |
| Get the MIME types from getMimesFromData(), but convert the result from IE's idiosyncratic private types into something other apps will understand. param: string $fileName the file name (unused at present) param: string $chunk the first 256 bytes of the file param: string $proposed the MIME type proposed by the server return: Array: map of IE version to detected MIME type |
| translateMimeType( $type ) X-Ref |
| Translate a MIME type from IE's idiosyncratic private types into more commonly understood type strings param: $type return: string |
| getMimesFromData( $fileName, $chunk, $proposed ) X-Ref |
| Get the untranslated MIME types for all known versions param: string $fileName the file name (unused at present) param: string $chunk the first 256 bytes of the file param: string $proposed the MIME type proposed by the server return: Array: map of IE version to detected MIME type |
| getMimeTypeForVersion( $version, $fileName, $chunk, $proposed ) X-Ref |
| Get the MIME type for a given named version param: $version param: $fileName param: $chunk param: $proposed return: bool|string |
| checkTextHeaders( $version, $chunk ) X-Ref |
| Check for text headers at the start of the chunk Confirmed same in 5 and 7. param: $version param: $chunk return: bool|string |
| checkBinaryHeaders( $version, $chunk ) X-Ref |
| Check for binary headers at the start of the chunk Confirmed same in 5 and 7. param: $version param: $chunk return: bool|string |
| sampleData( $version, $chunk ) X-Ref |
| Do heuristic checks on the bulk of the data sample. Search for HTML tags. param: $version param: $chunk return: array |
| getDataFormat( $version, $type ) X-Ref |
param: $version param: $type return: int|string |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |