Completed
Pull Request — master (#36)
by
unknown
20:47
created

SemanticExternalQueryLookup   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A onExtensionFunction() 0 16 1
A getVersion() 0 3 1
1
<?php
2
3
use SEQL\HookRegistry;
4
5
/**
6
 * @see https://github.com/SemanticMediaWiki/SemanticExternalQueryLookup/
7
 *
8
 * @defgroup SEQL Semantic External Query Lookup
9
 */
10
11
/**
12
 * @codeCoverageIgnore
13
 */
14
class SemanticExternalQueryLookup {
15
16
	/**
17
	 * @since 1.0
18
	 */
19
	public static function onExtensionFunction() {
20
21
		define( 'SEQL_VERSION', '1.0.0-alpha' );
22
		class_alias( 'SEQL\ByHttpRequestQueryLookup', 'SMWExternalQueryLookup' ); // deprecated
23
		class_alias( 'SEQL\ByHttpRequestQueryLookup', 'SMWExternalAskQueryLookup' );
24
25
		$options = array(
26
			'externalRepositoryEndpoints' => $GLOBALS['seqlgExternalRepositoryEndpoints']
27
		);
28
29
		$hookRegistry = new HookRegistry(
30
			$options
31
		);
32
33
		$hookRegistry->register();
34
	}
35
36
	/**
37
	 * @since 1.0
38
	 *
39
	 * @return string|null
40
	 */
41
	public static function getVersion() {
42
		return SEQL_VERSION;
43
	}
44
45
}
46