-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSemanticCompoundQueries.php
More file actions
42 lines (34 loc) · 1.46 KB
/
SemanticCompoundQueries.php
File metadata and controls
42 lines (34 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Initialization file for the SemanticCompoundQueries extension.
*
* @file SemanticCompoundQueries.php
* @ingroup SemanticCompoundQueries
*
* @author Yaron Koren
*/
/**
* This documentation group collects source-code files belonging to
* Semantic Compound Queries.
*
* @defgroup SemanticCompoundQueries SemanticCompoundQueries
*/
if ( !defined( 'MEDIAWIKI' ) ) die();
define( 'SCQ_VERSION', '0.3.4' );
$wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'parserhook'][] = array(
'path' => __FILE__,
'name' => 'Semantic Compound Queries',
'version' => SCQ_VERSION,
'author' => array( 'Yaron Koren' ),
'url' => 'https://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries',
'descriptionmsg' => 'semanticcompoundqueries-desc',
);
$wgExtensionMessagesFiles['SemanticCompoundQueries'] = dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.php';
$wgExtensionMessagesFiles['SemanticCompoundQueriesMagic'] = dirname( __FILE__ ) . '/SemanticCompoundQueries.i18n.magic.php';
$wgHooks['ParserFirstCallInit'][] = 'scqgRegisterParser';
$wgAutoloadClasses['SCQQueryProcessor'] = dirname( __FILE__ ) . '/SCQ_QueryProcessor.php';
$wgAutoloadClasses['SCQQueryResult'] = dirname( __FILE__ ) . '/SCQ_QueryResult.php';
function scqgRegisterParser( Parser &$parser ) {
$parser->setFunctionHook( 'compound_query', array( 'SCQQueryProcessor', 'doCompoundQuery' ) );
return true; // always return true, in order not to stop MW's hook processing!
}