| 1 |
<?php |
| 2 |
|
| 3 |
namespace MediaWiki\Extension\Math; |
| 4 |
|
| 5 |
use MediaWiki\Extension\Math\InputCheck\InputCheckFactory; |
| 6 |
use MediaWiki\MediaWikiServices; |
| 7 |
use Psr\Container\ContainerInterface; |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
final class Math { |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
private function __construct() { |
| 20 |
|
| 21 |
} |
| 22 |
|
| 23 |
public static function getMathConfig( ?ContainerInterface $services = null ): MathConfig { |
| 24 |
return ( $services ?: MediaWikiServices::getInstance() ) |
| 25 |
->get( 'Math.Config' ); |
| 26 |
} |
| 27 |
|
| 28 |
public static function getCheckerFactory( ?ContainerInterface $services = null ): InputCheckFactory { |
| 29 |
return ( $services ?: MediaWikiServices::getInstance() ) |
| 30 |
->get( 'Math.CheckerFactory' ); |
| 31 |
} |
| 32 |
} |