2020-05-12 18:22:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use MediaWiki\Config\ServiceOptions;
|
|
|
|
use MediaWiki\Extension\Math\InputCheck\InputCheckFactory;
|
2021-07-30 19:17:20 +00:00
|
|
|
use MediaWiki\Extension\Math\Render\RendererFactory;
|
2020-05-12 18:22:37 +00:00
|
|
|
use MediaWiki\Logger\LoggerFactory;
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
|
|
|
|
return [
|
2021-05-04 08:06:42 +00:00
|
|
|
'Math.CheckerFactory' => static function ( MediaWikiServices $services ): InputCheckFactory {
|
2020-05-12 18:22:37 +00:00
|
|
|
return new InputCheckFactory(
|
|
|
|
new ServiceOptions(
|
|
|
|
InputCheckFactory::CONSTRUCTOR_OPTIONS,
|
|
|
|
$services->getMainConfig()
|
|
|
|
),
|
|
|
|
$services->getMainWANObjectCache(),
|
|
|
|
$services->getHttpRequestFactory(),
|
|
|
|
LoggerFactory::getInstance( 'Math' )
|
|
|
|
);
|
|
|
|
},
|
2021-07-30 19:17:20 +00:00
|
|
|
'Math.RendererFactory' => static function ( MediaWikiServices $services ): RendererFactory {
|
|
|
|
return new RendererFactory(
|
|
|
|
new ServiceOptions(
|
|
|
|
RendererFactory::CONSTRUCTOR_OPTIONS,
|
|
|
|
$services->getMainConfig()
|
|
|
|
),
|
|
|
|
$services->getUserOptionsLookup(),
|
|
|
|
LoggerFactory::getInstance( 'Math' )
|
|
|
|
);
|
|
|
|
},
|
2020-05-12 18:22:37 +00:00
|
|
|
];
|