Skip to content

Commit 07379db

Browse files
committed
Simplify docs.
1 parent 9e01296 commit 07379db

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/MIME_TYPE_DETECTION

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
MIME type detection
22
-------------------
3-
The detection class `Media\Type` allows for detecting MIME types of files and
3+
The detection class `\mm\Mime\Type` allows for detecting MIME types of files and
44
streams by analyzing it's contents and/or extension. The class makes use of two
55
adapters (`magic` and `glob`) which must be configured before using any of the
66
methods and is thus "two-headed".
77

88
Usage
99
'''''
10-
`Mime\Type::guessType(...)`
10+
`Type::guessType(...)`
1111
Guesses the MIME type of the file.
1212

1313
```
14-
Mime\Type::guessType('example.png'); // returns 'image/png'
15-
Mime\Type::guessType('/path/to/example.png'); // returns 'image/png'
16-
Mime\Type::guessType($handle = fopen('/path/to/example.png', 'rb')); // returns 'image/png'
14+
Type::guessType('example.png'); // returns 'image/png'
15+
Type::guessType('/path/to/example.png'); // returns 'image/png'
16+
Type::guessType($handle = fopen('/path/to/example.png', 'rb')); // returns 'image/png'
1717
```
1818

19-
`Mime\Type::guessExtension(...)`
19+
`Type::guessExtension(...)`
2020
Guesses the extension (suffix) for an existing file or a MIME type.
2121

2222
```
23-
Mime\Type::guessExtension('application/pdf'); // returns 'pdf'
24-
Mime\Type::guessExtension('/path/to/example.png'); // returns 'png'
25-
Mime\Type::guessExtension($handle = fopen('/path/to/example.png', 'rb')); // returns 'png'
23+
Type::guessExtension('application/pdf'); // returns 'pdf'
24+
Type::guessExtension('/path/to/example.png'); // returns 'png'
25+
Type::guessExtension($handle = fopen('/path/to/example.png', 'rb')); // returns 'png'
2626
```
2727

28-
`Mime\Type::guessName(...)`
28+
`Type::guessName(...)`
2929
Determine the common lowercase media name, with and without hints from a magic
3030
lookup.
3131

3232
```
33-
Mime\Type::guessName('example.png'); // returns 'image'
34-
Mime\Type::guessName('example.webm'); // returns 'video'
35-
Mime\Type::guessName('application/pdf'); // returns 'document'
36-
Mime\Type::guessName('/path/to/example.png'); // returns 'image'
37-
Mime\Type::guessName($handle = fopen('/path/to/example.png', 'rb')); // returns 'image'
33+
Type::guessName('example.png'); // returns 'image'
34+
Type::guessName('example.webm'); // returns 'video'
35+
Type::guessName('application/pdf'); // returns 'document'
36+
Type::guessName('/path/to/example.png'); // returns 'image'
37+
Type::guessName($handle = fopen('/path/to/example.png', 'rb')); // returns 'image'
3838
```
3939

4040
Note: Most methods have additional options which give you more control about
4141
the output. Please consult the API documentation for more information
4242
on these options.
4343

44-
Available `Mime\Glob` Adapters
44+
Available `Glob` Adapters
4545
''''''''''''''''''''''''''''''
4646
`Apache`
4747
This adapter supports files like the ones that come with the `mod_mime_magic`
@@ -79,7 +79,7 @@ Can parse files containing one huge PHP array. Files must look like this:
7979
]; ?>
8080
```
8181

82-
Available `Mime\Magic` Adapters
82+
Available `Magic` Adapters
8383
'''''''''''''''''''''''''''''''
8484
`Apache`
8585
This adapter supports files like the ones that come with the `mod_mime_magic`

0 commit comments

Comments
 (0)