Semantic MediaWiki and related extensions
Static Public Member Functions | Static Protected Member Functions | List of all members
SCQ\CompoundQueryProcessor Class Reference
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 getProcessedParams (array $params, array $printRequests=array(), $unknownInvalid=true)
 
static getValidatorForParams (array $params, array $printRequests=array(), $unknownInvalid=true)
 
static createQuery ($queryString, array $params, $context=self::INLINE_QUERY, $format= '', array $extraPrintouts=array(), $contextPage=null)
 
static addThisPrintout (array &$printRequests, array $rawParams)
 
static processFunctionParams (array $rawParams, &$querystring, &$params, &$printouts, $showMode=false)
 
static getComponentsFromFunctionParams (array $rawParams, $showMode)
 
static getQueryAndParamsFromFunctionParams (array $rawParams, $outputMode, $context, $showMode, $contextPage=null)
 
static getResultFromFunctionParams (array $rawParams, $outputMode, $context=self::INLINE_QUERY, $showMode=false)
 
static getResultFromQueryString ($queryString, array $params, $extraPrintouts, $outputMode, $context=self::INLINE_QUERY)
 
static getResultFromQuery (SMWQuery $query, array $params, $outputMode, $context)
 
static getResultPrinter ($format, $context=self::SPECIAL_PAGE)
 
static getParameters ()
 
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= '')
 
- Static Protected Member Functions inherited from SMWQueryProcessor
static getSortKeys (array $sortParam, array $orderParam, $defaultSort)
 

Additional Inherited Members

- Public Attributes inherited from SMW\Query\QueryContext
const SPECIAL_PAGE = 1000
 
const INLINE_QUERY = 1001
 
const CONCEPT_DESC = 1002
 
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

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

Comparison helper function, used in sorting results.

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

Handler for the #compound_query parser function.

Parameters
Parser$parser
Returns
string
static SCQ\CompoundQueryProcessor::getQueryResultFromFunctionParams (   $rawparams,
  $context = QueryProcessor::INLINE_QUERY,
  $showmode = false 
)
staticprotected
Parameters
$rawparams
$context
$showmode
Returns
SMWQueryResult
static SCQ\CompoundQueryProcessor::getQueryResultFromQueryString (   $querystring,
array  $params,
  $extraPrintouts,
  $context = QueryProcessor::INLINE_QUERY 
)
staticprotected
Parameters
$querystring
array$params
$extraPrintouts
$outputMode
$context
Returns
SMWQueryResult
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
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
static SCQ\CompoundQueryProcessor::mergeSMWPrintRequests (   $printRequests1,
  $printRequests2 
)
staticprotected
static SCQ\CompoundQueryProcessor::mergeSMWQueryResults (   $result1,
  $result2 
)
staticprotected

Combine two arrays of SMWWikiPageValue objects into one

Parameters
array$result1
array$result2
Returns
array
static SCQ\CompoundQueryProcessor::queryAndMergeResults (   $queryParams,
  $otherParams 
)
static

Query and merge results of subqueries.

Parameters
$queryParams
$otherParams
Returns
array
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: