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

SemanticExternalQueryLookup::initExtension()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 9.584
c 0
b 0
f 0
cc 1
nc 1
nop 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A SemanticExternalQueryLookup::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