1 | <?php |
||
23 | class ConstraintsServices { |
||
24 | |||
25 | const LOGGING_HELPER = 'WBQC_LoggingHelper'; |
||
26 | const CONSTRAINT_REPOSITORY = 'WBQC_ConstraintRepository'; |
||
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 = null, $name ) { |
||
47 | |||
48 | /** |
||
49 | * @param MediaWikiServices|null $services |
||
50 | * @return LoggingHelper |
||
51 | */ |
||
52 | public static function getLoggingHelper( MediaWikiServices $services = null ) { |
||
55 | |||
56 | /** |
||
57 | * @param MediaWikiServices|null $services |
||
58 | * @return ConstraintRepository |
||
59 | */ |
||
60 | public static function getConstraintRepository( MediaWikiServices $services = null ) { |
||
63 | |||
64 | /** |
||
65 | * @param MediaWikiServices|null $services |
||
66 | * @return ConstraintLookup |
||
67 | */ |
||
68 | public static function getConstraintLookup( MediaWikiServices $services = null ) { |
||
71 | |||
72 | /** |
||
73 | * @param MediaWikiServices|null $services |
||
74 | * @return CheckResultSerializer |
||
75 | */ |
||
76 | public static function getCheckResultSerializer( MediaWikiServices $services = null ) { |
||
79 | |||
80 | /** |
||
81 | * @param MediaWikiServices|null $services |
||
82 | * @return CheckResultDeserializer |
||
83 | */ |
||
84 | public static function getCheckResultDeserializer( MediaWikiServices $services = null ) { |
||
87 | |||
88 | /** |
||
89 | * @param MediaWikiServices|null $services |
||
90 | * @return ViolationMessageSerializer |
||
91 | */ |
||
92 | public static function getViolationMessageSerializer( MediaWikiServices $services = null ) { |
||
95 | |||
96 | /** |
||
97 | * @param MediaWikiServices|null $services |
||
98 | * @return ViolationMessageDeserializer |
||
99 | */ |
||
100 | public static function getViolationMessageDeserializer( MediaWikiServices $services = null ) { |
||
103 | |||
104 | /** |
||
105 | * @param MediaWikiServices|null $services |
||
106 | * @return ConstraintParameterParser |
||
107 | */ |
||
108 | public static function getConstraintParameterParser( MediaWikiServices $services = null ) { |
||
111 | |||
112 | /** |
||
113 | * @param MediaWikiServices|null $services |
||
114 | * @return ConnectionCheckerHelper |
||
115 | */ |
||
116 | public static function getConnectionCheckerHelper( MediaWikiServices $services = null ) { |
||
119 | |||
120 | /** |
||
121 | * @param MediaWikiServices|null $services |
||
122 | * @return RangeCheckerHelper |
||
123 | */ |
||
124 | public static function getRangeCheckerHelper( MediaWikiServices $services = null ) { |
||
127 | |||
128 | /** |
||
129 | * @param MediaWikiServices|null $services |
||
130 | * @return SparqlHelper |
||
131 | */ |
||
132 | public static function getSparqlHelper( MediaWikiServices $services = null ) { |
||
135 | |||
136 | /** |
||
137 | * @param MediaWikiServices|null $services |
||
138 | * @return TypeCheckerHelper |
||
139 | */ |
||
140 | public static function getTypeCheckerHelper( MediaWikiServices $services = null ) { |
||
143 | |||
144 | /** |
||
145 | * @param MediaWikiServices|null $services |
||
146 | * @return DelegatingConstraintChecker |
||
147 | */ |
||
148 | public static function getDelegatingConstraintChecker( MediaWikiServices $services = null ) { |
||
151 | |||
152 | /** |
||
153 | * @param MediaWikiServices|null $services |
||
154 | * @return ResultsSource |
||
155 | */ |
||
156 | public static function getResultsSource( MediaWikiServices $services = null ) { |
||
159 | |||
160 | /** |
||
161 | * @return ExpiryLock |
||
162 | */ |
||
163 | public static function getExpiryLock( MediaWikiServices $services = null ) { |
||
166 | |||
167 | } |
||
168 |