Debian Codegraph @

extensions/Math/src/Math.php

raw symbols SCIP
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 * Top level factory for the Math extension.
11 *
12 * @license GPL-2.0-or-later
13 */
14 final class Math {
15
16 /**
17 * @codeCoverageIgnore
18 */
19 private function __construct() {
20 // should not be instantiated
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 }