Public Member Functions | |
| __construct ($description=null, $inline=false, $concept=false) | |
| Constructor. | |
| setMainLabel ($mainlabel) | |
| Sets the mainlabel. | |
| getMainLabel () | |
| Gets the mainlabel. | |
| setDescription (SMWDescription $description) | |
| getDescription () | |
| setExtraPrintouts ($extraprintouts) | |
| getExtraPrintouts () | |
| getErrors () | |
| addErrors ($errors) | |
| setQueryString ($querystring) | |
| getQueryString () | |
| getOffset () | |
| setOffset ($offset) | |
| Set an offset for the returned query results. | |
| getLimit () | |
| setLimit ($limit, $restrictinline=true) | |
| Set a limit for number of query results. | |
| applyRestrictions () | |
| Apply structural restrictions to the current description. | |
Public Attributes | |
| const | MODE_INSTANCES = 1 |
| const | MODE_COUNT = 2 |
| const | MODE_DEBUG = 3 |
| const | MODE_NONE = 4 |
| $sort = false | |
| $sortkeys = array() | |
| $querymode = SMWQuery::MODE_INSTANCES | |
Protected Attributes | |
| $m_limit | |
| $m_offset = 0 | |
| $m_description | |
| $m_errors = array() | |
| $m_querystring = false | |
| $m_inline | |
| $m_concept | |
| $m_extraprintouts = array() | |
| $m_mainlabel = '' | |
Some settings might also lead to changes in the query description.
Most additional query parameters (limit, sort, ascending, ...) are interpreted as in SMWRequestOptions (though the latter contains some additional settings).
Definition at line 28 of file SMW_Query.php.
| SMWQuery::__construct | ( | $ | description = null, |
|
| $ | inline = false, |
|||
| $ | concept = false | |||
| ) |
Constructor.
| $description | Optional SMWDescription object describing the query conditions | |
| $inline | bool stating whether this query runs in an inline context; used to determine proper default parameters (e.g. the default limit) | |
| $concept | bool stating whether this query belongs to a concept; used to determine proper default parameters (concepts usually have less restrictions) |
Definition at line 57 of file SMW_Query.php.
References $smwgQMaxInlineLimit, $smwgQMaxLimit, and applyRestrictions().
| SMWQuery::setMainLabel | ( | $ | mainlabel | ) |
Sets the mainlabel.
| string | $mainlabel |
Definition at line 73 of file SMW_Query.php.
| SMWQuery::getMainLabel | ( | ) |
| SMWQuery::setDescription | ( | SMWDescription $ | description | ) |
Definition at line 88 of file SMW_Query.php.
References SMWDescription::addPrintRequest(), and applyRestrictions().
| SMWQuery::getDescription | ( | ) |
Definition at line 96 of file SMW_Query.php.
Referenced by SMWSQLStore2QueryEngine::getInstanceQueryResult().
| SMWQuery::setExtraPrintouts | ( | $ | extraprintouts | ) |
Definition at line 100 of file SMW_Query.php.
| SMWQuery::getExtraPrintouts | ( | ) |
Definition at line 110 of file SMW_Query.php.
| SMWQuery::getErrors | ( | ) |
Definition at line 114 of file SMW_Query.php.
| SMWQuery::addErrors | ( | $ | errors | ) |
Definition at line 118 of file SMW_Query.php.
Referenced by SMWSQLStore2QueryEngine::getQueryResult().
| SMWQuery::setQueryString | ( | $ | querystring | ) |
Definition at line 122 of file SMW_Query.php.
| SMWQuery::getQueryString | ( | ) |
Definition at line 126 of file SMW_Query.php.
| SMWQuery::getOffset | ( | ) |
Definition at line 136 of file SMW_Query.php.
| SMWQuery::setOffset | ( | $ | offset | ) |
Set an offset for the returned query results.
No offset beyond the maximal query limit will be set, and the current query limit might be reduced in order to ensure that no results beyond the maximal limit are returned. The function returns the chosen offset.
Definition at line 148 of file SMW_Query.php.
References $smwgQMaxLimit.
| SMWQuery::getLimit | ( | ) |
Definition at line 155 of file SMW_Query.php.
| SMWQuery::setLimit | ( | $ | limit, | |
| $ | restrictinline = true | |||
| ) |
Set a limit for number of query results.
The set limit might be restricted by the current offset so as to ensure that the number of the last considered result does not exceed the maximum amount of supported results. The function returns the chosen limit.
Definition at line 166 of file SMW_Query.php.
References $smwgQMaxInlineLimit, and $smwgQMaxLimit.
| SMWQuery::applyRestrictions | ( | ) |
Apply structural restrictions to the current description.
Definition at line 176 of file SMW_Query.php.
References $smwgQConceptMaxDepth, $smwgQConceptMaxSize, $smwgQMaxDepth, and $smwgQMaxSize.
Referenced by __construct(), and setDescription().
| const SMWQuery::MODE_INSTANCES = 1 |
Definition at line 30 of file SMW_Query.php.
Referenced by SMWSearchByProperty::getNearbyResults(), SRFvCard::getQueryMode(), SRFiCalendar::getQueryMode(), SRFBibTeX::getQueryMode(), SRFArray::getQueryMode(), SMWResultPrinter::getQueryMode(), SMWRSSResultPrinter::getQueryMode(), SMWRDFResultPrinter::getQueryMode(), SMWJSONResultPrinter::getQueryMode(), SMWDSVResultPrinter::getQueryMode(), SMWCsvResultPrinter::getQueryMode(), SMWQueryProcessor::getResultFromQuery(), and SMWSQLStore2QueryEngine::refreshConceptCache().
| const SMWQuery::MODE_COUNT = 2 |
Definition at line 31 of file SMW_Query.php.
Referenced by SMWQueryProcessor::createQuery(), SMWSQLStore2QueryEngine::getQueryResult(), and SMWSparqlStore::getQueryResult().
| const SMWQuery::MODE_DEBUG = 3 |
Definition at line 32 of file SMW_Query.php.
Referenced by SMWSQLStore2QueryEngine::cleanUp(), SMWQueryProcessor::createQuery(), SMWSQLStore2QueryEngine::executeHierarchyQuery(), SMWSQLStore2QueryEngine::executeQueries(), SMWSQLStore2QueryEngine::getQueryResult(), and SMWSparqlStore::getQueryResult().
| const SMWQuery::MODE_NONE = 4 |
Definition at line 33 of file SMW_Query.php.
Referenced by SMWQueryProcessor::createQuery(), SRFvCard::getQueryMode(), SRFiCalendar::getQueryMode(), SRFBibTeX::getQueryMode(), SMWRSSResultPrinter::getQueryMode(), SMWRDFResultPrinter::getQueryMode(), SMWJSONResultPrinter::getQueryMode(), SMWDSVResultPrinter::getQueryMode(), SMWCsvResultPrinter::getQueryMode(), SMWSQLStore2QueryEngine::getQueryResult(), SMWSparqlStore::getQueryResult(), and SMWQueryProcessor::getResultFromQuery().
| SMWQuery::$sort = false |
Definition at line 35 of file SMW_Query.php.
| SMWQuery::$sortkeys = array() |
Definition at line 36 of file SMW_Query.php.
| SMWQuery::$querymode = SMWQuery::MODE_INSTANCES |
Definition at line 37 of file SMW_Query.php.
SMWQuery::$m_limit [protected] |
Definition at line 39 of file SMW_Query.php.
SMWQuery::$m_offset = 0 [protected] |
Definition at line 40 of file SMW_Query.php.
SMWQuery::$m_description [protected] |
Definition at line 41 of file SMW_Query.php.
SMWQuery::$m_errors = array() [protected] |
Definition at line 42 of file SMW_Query.php.
SMWQuery::$m_querystring = false [protected] |
Definition at line 43 of file SMW_Query.php.
SMWQuery::$m_inline [protected] |
Definition at line 44 of file SMW_Query.php.
SMWQuery::$m_concept [protected] |
Definition at line 45 of file SMW_Query.php.
SMWQuery::$m_extraprintouts = array() [protected] |
Definition at line 46 of file SMW_Query.php.
SMWQuery::$m_mainlabel = '' [protected] |
Definition at line 47 of file SMW_Query.php.
1.5.6