2022-07-21 15:47:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\Math;
|
|
|
|
|
2022-11-22 14:11:26 +00:00
|
|
|
use MediaWiki\Extension\Math\InputCheck\InputCheckFactory;
|
2022-07-21 15:47:52 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Top level factory for the Math extension.
|
|
|
|
*
|
|
|
|
* @license GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
final class Math {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @codeCoverageIgnore
|
|
|
|
*/
|
|
|
|
private function __construct() {
|
|
|
|
// should not be instantiated
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function getMathConfig( ContainerInterface $services = null ): MathConfig {
|
|
|
|
return ( $services ?: MediaWikiServices::getInstance() )
|
|
|
|
->get( 'Math.Config' );
|
|
|
|
}
|
|
|
|
|
2022-11-22 14:11:26 +00:00
|
|
|
public static function getCheckerFactory( ContainerInterface $services = null ): InputCheckFactory {
|
|
|
|
return ( $services ?: MediaWikiServices::getInstance() )
|
|
|
|
->get( 'Math.CheckerFactory' );
|
|
|
|
}
|
2022-07-21 15:47:52 +00:00
|
|
|
}
|