Semantic MediaWiki and related extensions
Static Public Member Functions | Static Protected Member Functions | List of all members
SCQ\CompoundQueryProcessor Class Reference
Inheritance diagram for SCQ\CompoundQueryProcessor:
Inheritance graph
[legend]
Collaboration diagram for SCQ\CompoundQueryProcessor:
Collaboration graph
[legend]

Static Public Member Functions

static compareQueryResults ( $a, $b)
 
static doCompoundQuery (Parser &$parser)
 
static separateParams ( $params)
 
static queryAndMergeResults ( $queryParams, $otherParams)
 
- Static Public Member Functions inherited from SMWQueryProcessor
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)
 

Static Protected Member Functions

static getSubParams ( $param)
 
static getQueryResultFromFunctionParams ( $rawParams, $context=QueryProcessor::INLINE_QUERY, $showMode=false)
 
static mergeSMWQueryResults ( $result1, $result2)
 
static mergeSMWPrintRequests ( $printRequests1, $printRequests2)
 
static getQueryResultFromQueryString ( $querystring, array $params, $extraPrintouts, $context=QueryProcessor::INLINE_QUERY)
 
static getResultFromQueryResult (CompoundQueryResult $res, array $params, $outputmode, $context=QueryProcessor::INLINE_QUERY, $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
 

Detailed Description

Class that holds static functions for handling compound queries. This class inherits from Semantic MediaWiki's QueryProcessor.

GNU GPL v2+

Since
1.0
Author
Yaron Koren
Peter Grassberger < peter.nosp@m.theo.nosp@m.ne@gm.nosp@m.ail..nosp@m.com >

Member Function Documentation

◆ compareQueryResults()

static SCQ\CompoundQueryProcessor::compareQueryResults (   $a,
  $b 
)
static

Comparison helper function, used in sorting results.

◆ doCompoundQuery()

static SCQ\CompoundQueryProcessor::doCompoundQuery ( Parser &  $parser)
static

Handler for the #compound_query parser function.

Parameters
Parser$parser
Returns
string

◆ getQueryResultFromFunctionParams()

static SCQ\CompoundQueryProcessor::getQueryResultFromFunctionParams (   $rawParams,
  $context = QueryProcessor::INLINE_QUERY,
  $showMode = false 
)
staticprotected
Parameters
$rawparams
$context
$showmode
Returns
SMWQueryResult

◆ getQueryResultFromQueryString()

static SCQ\CompoundQueryProcessor::getQueryResultFromQueryString (   $querystring,
array  $params,
  $extraPrintouts,
  $context = QueryProcessor::INLINE_QUERY 
)
staticprotected
Parameters
$querystring
array$params
$extraPrintouts
$outputMode
$context
Returns
SMWQueryResult

◆ getResultFromQueryResult()

static SCQ\CompoundQueryProcessor::getResultFromQueryResult ( CompoundQueryResult  $res,
array  $params,
  $outputmode,
  $context = QueryProcessor::INLINE_QUERY,
  $format = '' 
)
staticprotected

Matches getResultFromQueryResult() from SMWQueryProcessor, except that formats of type 'debug' and 'count' aren't handled.

Parameters
CompoundQueryResult$res
array$paramsThese need to be the result of a list fed to getProcessedParams as of SMW 1.6.2
$outputmode
$context
string$format
Returns
string

◆ getSubParams()

static SCQ\CompoundQueryProcessor::getSubParams (   $param)
staticprotected

An alternative to explode() - that function won't work here, because we don't want to split the string on all semicolons, just the ones that aren't contained within square brackets

Parameters
string$param
Returns
array

◆ mergeSMWQueryResults()

static SCQ\CompoundQueryProcessor::mergeSMWQueryResults (   $result1,
  $result2 
)
staticprotected

Combine two arrays of SMWWikiPageValue objects into one

Parameters
array$result1
array$result2
Returns
array

◆ queryAndMergeResults()

static SCQ\CompoundQueryProcessor::queryAndMergeResults (   $queryParams,
  $otherParams 
)
static

Query and merge results of subqueries.

Parameters
$queryParams
$otherParams
Returns
array

◆ separateParams()

static SCQ\CompoundQueryProcessor::separateParams (   $params)
static

Separates $queryParams from $otherParams.

Parameters
$params
Returns
array

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy