Semantic MediaWiki and related extensions
|
Static Public Member Functions | |
static | setRecursiveTextProcessor (RecursiveTextProcessor $recursiveTextProcessor=null) |
static | getProcessedParams (array $params, array $printRequests=[], $unknownInvalid=true, $context=null, $showMode=false) |
static | createQuery ( $queryString, array $params, $context=self::INLINE_QUERY, $format='', array $extraPrintouts=[], $contextPage=null) |
static | addThisPrintout (array &$printRequests, array $rawParams) |
static | getQueryAndParamsFromFunctionParams (array $rawParams, $outputMode, $context, $showMode, $contextPage=null) |
static | getResultFromQuery (SMWQuery $query, array $params, $outputMode, $context) |
static | getParameters ( $context=null, $resultPrinter=null) |
static | getFormatParameters ( $format) |
Additional Inherited Members | |
Public Attributes inherited from SMW\Query\QueryContext | |
const | SPECIAL_PAGE = 1000 |
const | INLINE_QUERY = 1001 |
const | DEFERRED_QUERY = 1002 |
const | CONCEPT_DESC = 1003 |
const | CURTAILMENT_MODE = 1004 |
const | MODE_INSTANCES = 1 |
const | MODE_COUNT = 2 |
const | MODE_DEBUG = 3 |
const | MODE_NONE = 4 |
Static class for accessing functions to generate and execute semantic queries and to serialise their results.
|
static |
Add the subject print request, unless mainlabel is set to "-".
array | $printRequests | |
array | $rawParams |
|
static |
Parse a query string given in SMW's query language to create an SMWQuery. Parameters are given as key-value-pairs in the given array. The parameter $context defines in what context the query is used, which affects ceretain general settings. An object of type SMWQuery is returned.
The format string is used to specify the output format if already known. Otherwise it will be determined from the parameters when needed. This parameter is just for optimisation in a common case.
string | $queryString | |
array | $params | These need to be the result of a list fed to getProcessedParams |
$context | ||
string | $format | |
array | $extraPrintouts |
|
static |
Returns the definitions of all parameters supported by the specified format.
string | $format |
|
static |
Produces a list of default allowed parameters for a result printer. Most query printers should override this function.
integer | null | $context | |
ResultPrinter | null | $resultPrinter |
|
static |
Takes an array of unprocessed parameters, processes them using Validator, and returns them.
Both input and output arrays are param name (string) => param value (mixed)
array | $params | |
PrintRequest[] | $printRequests | |
boolean | $unknownInvalid |
|
static |
Process and answer a query as given by an array of parameters as is typically produced by the #ask parser function. The parameter $context defines in what context the query is used, which affects certain general settings.
The main task of this function is to preprocess the raw parameters to obtain actual parameters, printout requests, and the query string for further processing.
array | $rawParams | user-provided list of unparsed parameters |
integer | $outputMode | SMW_OUTPUT_WIKI, SMW_OUTPUT_HTML, ... |
integer | $context | INLINE_QUERY, SPECIAL_PAGE, CONCEPT_DESC |
boolean | $showMode | process like #show parser function? |
|
static |
Create a fully formatted result string from a query and its parameters. The method takes care of processing various types of query result. Most cases are handled by printers, but counting and debugging uses special code.
SMWQuery | $query | |
array | $params | These need to be the result of a list fed to getProcessedParams |
integer | $outputMode | |
integer | $context |
|
static |
RecursiveTextProcessor | null | $recursiveTextProcessor |