1 | <?php |
||
23 | class ConstraintsServices { |
||
24 | |||
25 | const LOGGING_HELPER = 'WBQC_LoggingHelper'; |
||
26 | const CONSTRAINT_STORE = 'WBQC_ConstraintStore'; |
||
27 | const CONSTRAINT_LOOKUP = 'WBQC_ConstraintLookup'; |
||
28 | const CHECK_RESULT_SERIALIZER = 'WBQC_CheckResultSerializer'; |
||
29 | const CHECK_RESULT_DESERIALIZER = 'WBQC_CheckResultDeserializer'; |
||
30 | const VIOLATION_MESSAGE_SERIALIZER = 'WBQC_ViolationMessageSerializer'; |
||
31 | const VIOLATION_MESSAGE_DESERIALIZER = 'WBQC_ViolationMessageDeserializer'; |
||
32 | const CONSTRAINT_PARAMETER_PARSER = 'WBQC_ConstraintParameterParser'; |
||
33 | const CONNECTION_CHECKER_HELPER = 'WBQC_ConnectionCheckerHelper'; |
||
34 | const RANGE_CHECKER_HELPER = 'WBQC_RangeCheckerHelper'; |
||
35 | const SPARQL_HELPER = 'WBQC_SparqlHelper'; |
||
36 | const TYPE_CHECKER_HELPER = 'WBQC_TypeCheckerHelper'; |
||
37 | const DELEGATING_CONSTRAINT_CHECKER = 'WBQC_DelegatingConstraintChecker'; |
||
38 | const RESULTS_SOURCE = 'WBQC_ResultsSource'; |
||
39 | const EXPIRY_LOCK = 'WBQC_ExpiryLock'; |
||
40 | |||
41 | private static function getService( ?MediaWikiServices $services, $name ) { |
||
47 | |||
48 | public static function getLoggingHelper( MediaWikiServices $services = null ): LoggingHelper { |
||
51 | |||
52 | public static function getConstraintStore( |
||
53 | MediaWikiServices $services = null |
||
54 | ): ConstraintStore { |
||
55 | return self::getService( $services, self::CONSTRAINT_STORE ); |
||
56 | } |
||
57 | |||
58 | public static function getConstraintLookup( MediaWikiServices $services = null ): ConstraintLookup { |
||
61 | |||
62 | public static function getCheckResultSerializer( |
||
67 | |||
68 | public static function getCheckResultDeserializer( |
||
73 | |||
74 | public static function getViolationMessageSerializer( |
||
79 | |||
80 | public static function getViolationMessageDeserializer( |
||
85 | |||
86 | public static function getConstraintParameterParser( |
||
91 | |||
92 | public static function getConnectionCheckerHelper( |
||
97 | |||
98 | public static function getRangeCheckerHelper( MediaWikiServices $services = null ): RangeCheckerHelper { |
||
101 | |||
102 | public static function getSparqlHelper( MediaWikiServices $services = null ): SparqlHelper { |
||
105 | |||
106 | public static function getTypeCheckerHelper( MediaWikiServices $services = null ): TypeCheckerHelper { |
||
109 | |||
110 | public static function getDelegatingConstraintChecker( |
||
115 | |||
116 | public static function getResultsSource( MediaWikiServices $services = null ): ResultsSource { |
||
119 | |||
120 | /** |
||
121 | * @return ExpiryLock |
||
122 | */ |
||
123 | public static function getExpiryLock( MediaWikiServices $services = null ) { |
||
126 | |||
127 | } |
||
128 |