37 'image/jpeg' => JpegHandler::class,
38 'image/png' => PNGHandler::class,
39 'image/gif' => GIFHandler::class,
40 'image/tiff' => TiffHandler::class,
41 'image/webp' => WebPHandler::class,
42 'image/x-ms-bmp' => BmpHandler::class,
43 'image/x-bmp' => BmpHandler::class,
44 'image/x-xcf' => XCFHandler::class,
45 'image/svg+xml' => SvgHandler::class,
46 'image/svg' => SvgHandler::class,
47 'image/vnd.djvu' => DjVuHandler::class,
48 'image/x.djvu' => DjVuHandler::class,
49 'image/x-djvu' => DjVuHandler::class,
65 $this->registry = $registry + self::$coreHandlers;
69 return $this->registry[
$type] ??
false;
77 if ( isset( $this->handlers[
$type] ) ) {
78 return $this->handlers[
$type];
82 if ( $class !==
false ) {
84 $handler =
new $class;
85 if ( !$handler->isEnabled() ) {
86 wfDebug( __METHOD__ .
": $class is not enabled\n" );
90 wfDebug( __METHOD__ .
": no handler found for $type.\n" );
94 $this->handlers[
$type] = $handler;
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.