handlers[$type] ) ) { return $this->handlers[$type]; } $class = $this->getHandlerClass( $type ); if ( $class !== false ) { /** @var MediaHandler $handler */ $handler = new $class; if ( !$handler->isEnabled() ) { wfDebug( __METHOD__ . ": $class is not enabled\n" ); $handler = false; } } else { wfDebug( __METHOD__ . ": no handler found for $type.\n" ); $handler = false; } $this->handlers[$type] = $handler; return $handler; } }