Semantic MediaWiki and related extensions
|
Public Member Functions | |
setCaller ( $caller) | |
getCaller () | |
addStringCondition ( $string, $condition, $isOr=false, $isNot=false) | |
getStringConditions () | |
addExtraCondition ( $extraCondition) | |
getExtraConditions () | |
emptyExtraConditions () | |
setOption ( $key, $value) | |
deleteOption ( $key) | |
getOption ( $key, $default=null) | |
setLimit ( $limit) | |
getLimit () | |
setOffset ( $offset) | |
getOffset () | |
setLookahead (int $lookahead) | |
getLookahead () | |
getHash () | |
Public Attributes | |
const | CONDITION_CONSTRAINT_RESULT = 'condition.constraint.result' |
const | CONDITION_CONSTRAINT = 'conditon.constraint' |
const | PREFETCH_FINGERPRINT = 'prefetch.fingerprint' |
const | SEARCH_FIELD = 'search_field' |
$limit = -1 | |
$exclude_limit = false | |
$offset = 0 | |
$lookahead = 0 | |
$sort = false | |
$ascending = true | |
$boundary = null | |
$include_boundary = true | |
Container object for various options that can be used when retrieving data from the store. These options are mostly relevant for simple, direct requests – inline queries may require more complex options due to their more complex structure. Options that should not be used or where default values should be used can be left as initialised.
GNU GPL v2+
SMW\RequestOptions::addExtraCondition | ( | $extraCondition | ) |
mixed | $extraCondition |
SMW\RequestOptions::addStringCondition | ( | $string, | |
$condition, | |||
$isOr = false , |
|||
$isNot = false |
|||
) |
string | $string | to match |
integer | $condition | one of STRCOND_PRE, STRCOND_POST, STRCOND_MID |
boolean | $isOr | |
boolean | $isNot |
SMW\RequestOptions::deleteOption | ( | $key | ) |
string | $key | |
string | $value |
SMW\RequestOptions::emptyExtraConditions | ( | ) |
SMW\RequestOptions::getCaller | ( | ) |
SMW\RequestOptions::getExtraConditions | ( | ) |
array |
SMW\RequestOptions::getHash | ( | ) |
SMW\RequestOptions::getLimit | ( | ) |
SMW\RequestOptions::getLookahead | ( | ) |
SMW\RequestOptions::getOffset | ( | ) |
SMW\RequestOptions::getOption | ( | $key, | |
$default = null |
|||
) |
string | $key | |
mixed | $default |
SMW\RequestOptions::getStringConditions | ( | ) |
Return the specified array of SMWStringCondition objects.
SMW\RequestOptions::setCaller | ( | $caller | ) |
string | $caller |
SMW\RequestOptions::setLimit | ( | $limit | ) |
integer | $limit |
SMW\RequestOptions::setLookahead | ( | int | $lookahead | ) |
integer | $lookahead |
SMW\RequestOptions::setOffset | ( | $offset | ) |
integer | $offset |
SMW\RequestOptions::setOption | ( | $key, | |
$value | |||
) |
string | $key | |
string | $value |
SMW\RequestOptions::$ascending = true |
If SMWRequestOptions->$sort is true, this parameter defines whether the results are ordered in ascending or descending order.
SMW\RequestOptions::$boundary = null |
Specifies a lower or upper bound for the values returned by the query. Whether it is lower or upper is specified by the parameter "ascending" (true->lower, false->upper).
SMW\RequestOptions::$exclude_limit = false |
For certain queries (prefetch using WHERE IN) using the limit will cause the whole set to be restricted on a bulk instead of only applied to a subset therefore allow the exclude the limit and apply an restriction during the post-processing.
SMW\RequestOptions::$include_boundary = true |
Specifies whether or not the requested boundary should be returned as a result.
SMW\RequestOptions::$limit = -1 |
The maximum number of results that should be returned.
SMW\RequestOptions::$lookahead = 0 |
A numerical size to indicate a "look ahead" beyond the defined limit.
SMW\RequestOptions::$offset = 0 |
A numerical offset. The first $offset results are skipped. Note that this does not imply a defined order of results (see SMWRequestOptions->$sort below).
SMW\RequestOptions::$sort = false |
Should the result be ordered? The employed order is defined by the type of result that are requested: wiki pages and strings are ordered alphabetically, whereas other data is ordered numerically. Usually, the order should be fairly "natural".
const SMW\RequestOptions::CONDITION_CONSTRAINT = 'conditon.constraint' |
Used to identify a constraint conidtion set forth by any other query process.
const SMW\RequestOptions::CONDITION_CONSTRAINT_RESULT = 'condition.constraint.result' |
Used to identify a constraint conition set forth by the QueryResult process which doesn't modify the limit
.
const SMW\RequestOptions::PREFETCH_FINGERPRINT = 'prefetch.fingerprint' |
Defines a prefetch fingerprint
const SMW\RequestOptions::SEARCH_FIELD = 'search_field' |
Defines an individual search field