20declare( strict_types=1 );
45 private const SUPPORTED_FORMATS = [
58 if ( self::SUPPORTED_FORMATS[$format] ?? false ) {
59 return self::SUPPORTED_FORMATS[$format];
62 "Format '" . $format .
"' not supported. Expected one of "
63 . json_encode( array_keys( self::SUPPORTED_FORMATS ) )
101 switch ( get_class( $formatter ) ) {
102 case StatsdFormatter::class:
103 case DogStatsdFormatter::class:
104 return new UDPEmitter( $prefix, $cache, $formatter, $target );
105 case NullFormatter::class:
109 'Unsupported metrics format. Got format: ' . get_class( $formatter )
if(!defined('MW_SETUP_CALLBACK'))