mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-04 20:18:35 +00:00
b3e57cbfc2
Otherwise IDEs and other tools don't know what's going on. ...->getService() returns mixed. Change-Id: If0429485941c19eb0e88896cb1ada66a5320bafe
33 lines
766 B
PHP
33 lines
766 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Math;
|
|
|
|
use MediaWiki\Extension\Math\InputCheck\InputCheckFactory;
|
|
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' );
|
|
}
|
|
|
|
public static function getCheckerFactory( ContainerInterface $services = null ): InputCheckFactory {
|
|
return ( $services ?: MediaWikiServices::getInstance() )
|
|
->get( 'Math.CheckerFactory' );
|
|
}
|
|
}
|