Skip to content

Commit

Permalink
Update mime.rst
Browse files Browse the repository at this point in the history
Hello,

Update code sample for MimeTypes : current reassign variable so code fails to run if you copy paste it fully.
  • Loading branch information
JakeFr authored Jun 1, 2021
1 parent 57aaeb3 commit 9f00cd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/mime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ MIME types and file name extensions::
$exts = $mimeTypes->getExtensions('image/jpeg');
// $exts = ['jpeg', 'jpg', 'jpe']

$mimeTypes = $mimeTypes->getMimeTypes('js');
// $mimeTypes = ['application/javascript', 'application/x-javascript', 'text/javascript']
$mimeTypes = $mimeTypes->getMimeTypes('apk');
// $mimeTypes = ['application/vnd.android.package-archive']
$types = $mimeTypes->getMimeTypes('js');
// $types = ['application/javascript', 'application/x-javascript', 'text/javascript']
$types = $mimeTypes->getMimeTypes('apk');
// $types = ['application/vnd.android.package-archive']

These methods return arrays with one or more elements. The element position
indicates its priority, so the first returned extension is the preferred one.
Expand Down

0 comments on commit 9f00cd8

Please sign in to comment.