Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\Scribunto\LuaAskResultProcessor Class Reference

Public Member Functions

 __construct (QueryResult $queryResult)
 
 getProcessedResult ()
 
 getKeyFromPrintRequest (PrintRequest $printRequest)
 
 extractLuaDataFromDVData ($resultArrayData)
 
 getNumericIndex ()
 

Constructor & Destructor Documentation

SMW\Scribunto\LuaAskResultProcessor::__construct ( QueryResult  $queryResult)

LuaAskResultProcessor constructor.

Parameters
QueryResult$queryResult

Member Function Documentation

SMW\Scribunto\LuaAskResultProcessor::extractLuaDataFromDVData (   $resultArrayData)

Takes an array of data fields and returns either null, a single value or a lua table.

Parameters
array$resultArrayData
Returns
mixed
SMW\Scribunto\LuaAskResultProcessor::getKeyFromPrintRequest ( PrintRequest  $printRequest)

Takes an smw query print request and tries to retrieve the label falls back to {

See also
getNumericIndex} if none was found
Parameters
PrintRequest$printRequestgetNumericIndex
Returns
int|string
SMW\Scribunto\LuaAskResultProcessor::getNumericIndex ( )

Returns current numeric index (and increases it afterwards)

$numericIndex

Returns
int
SMW\Scribunto\LuaAskResultProcessor::getProcessedResult ( )

Extracts the data in {

See also
$queryResult} and returns it as a table usable in lua context

getDataFromQueryResultRow

Returns
array|null

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