MediaWiki
REL1_22
|
Public Member Functions | |
execute () | |
Get the parameters, find out what the conditions for the query are, run it, and add the results. | |
getAllowedParams () | |
getParamDescription () | |
Protected Member Functions | |
addResults (array $params, ORMResult $results) | |
Serialize the results and add them to the result object. | |
addSerializedResults (array $serializedResults) | |
Add the serialized results to the result object. | |
formatRow (IORMRow $result, array $params) | |
Formats a row to it's desired output format. | |
getConditions (array $params) | |
Get the conditions for the query. | |
getListName () | |
Returns the name of the list of rows. | |
getParams () | |
Get the request parameters and remove all params set to null (ie those that are not actually provided). | |
getResultPath () | |
Returns the path to where the items results should be added in the result. | |
getResults (array $params, array $conditions) | |
Get the actual results. | |
getRowName () | |
Returns the name of the individual rows. | |
getTable () | |
Returns an instance of the IORMTable table being queried. | |
setIndexedTagNames (array &$serializedResults) | |
Set the tag names for formats such as XML. |
Definition at line 29 of file ApiQueryORM.php.
ApiQueryORM::addResults | ( | array $ | params, |
ORMResult $ | results | ||
) | [protected] |
Serialize the results and add them to the result object.
array | $params | |
ORMResult | $results |
Definition at line 167 of file ApiQueryORM.php.
References $count, $result, addSerializedResults(), array(), as, formatRow(), ApiQueryBase\setContinueEnumParameter(), and setIndexedTagNames().
Referenced by execute().
ApiQueryORM::addSerializedResults | ( | array $ | serializedResults | ) | [protected] |
Add the serialized results to the result object.
array | $serializedResults |
Definition at line 218 of file ApiQueryORM.php.
References getListName(), ApiBase\getResult(), and getResultPath().
Referenced by addResults().
Get the parameters, find out what the conditions for the query are, run it, and add the results.
Reimplemented from ApiBase.
Definition at line 85 of file ApiQueryORM.php.
References $params, addResults(), getConditions(), getParams(), and getResults().
ApiQueryORM::formatRow | ( | IORMRow $ | result, |
array $ | params | ||
) | [protected] |
Formats a row to it's desired output format.
IORMRow | $result | |
array | $params |
Definition at line 196 of file ApiQueryORM.php.
References IORMRow\toArray().
Referenced by addResults().
Reimplemented from ApiBase.
Definition at line 230 of file ApiQueryORM.php.
References $params, array(), getTable(), ApiBase\LIMIT_BIG1, ApiBase\LIMIT_BIG2, ApiBase\PARAM_DFLT, ApiBase\PARAM_ISMULTI, ApiBase\PARAM_MAX, ApiBase\PARAM_MAX2, ApiBase\PARAM_MIN, ApiBase\PARAM_REQUIRED, and ApiBase\PARAM_TYPE.
ApiQueryORM::getConditions | ( | array $ | params | ) | [protected] |
Get the conditions for the query.
These will be provided as regular parameters, together with limit, props, continue, and possibly others which we need to get rid off.
array | $params |
Definition at line 124 of file ApiQueryORM.php.
References ApiQueryBase\$fields, $name, $value, array(), as, and getTable().
Referenced by execute().
ApiQueryORM::getListName | ( | ) | [protected] |
Returns the name of the list of rows.
For example: pages, users, contests, campaigns, etc. This is used to appropriately name nodes in the output. Deriving classes typically override this method.
Definition at line 64 of file ApiQueryORM.php.
Referenced by addSerializedResults().
Reimplemented from ApiBase.
Definition at line 254 of file ApiQueryORM.php.
References array(), and getTable().
ApiQueryORM::getParams | ( | ) | [protected] |
Get the request parameters and remove all params set to null (ie those that are not actually provided).
Definition at line 104 of file ApiQueryORM.php.
References ApiBase\extractRequestParams().
Referenced by execute().
ApiQueryORM::getResultPath | ( | ) | [protected] |
Returns the path to where the items results should be added in the result.
Definition at line 75 of file ApiQueryORM.php.
Referenced by addSerializedResults().
ApiQueryORM::getResults | ( | array $ | params, |
array $ | conditions | ||
) | [protected] |
Get the actual results.
array | $params | |
array | $conditions |
Definition at line 147 of file ApiQueryORM.php.
References array(), and getTable().
Referenced by execute().
ApiQueryORM::getRowName | ( | ) | [protected] |
Returns the name of the individual rows.
For example: page, user, contest, campaign, etc. This is used to appropriately name elements in XML. Deriving classes typically override this method.
Definition at line 50 of file ApiQueryORM.php.
Referenced by setIndexedTagNames().
ApiQueryORM::getTable | ( | ) | [abstract, protected] |
Returns an instance of the IORMTable table being queried.
Referenced by getAllowedParams(), getConditions(), getParamDescription(), and getResults().
ApiQueryORM::setIndexedTagNames | ( | array &$ | serializedResults | ) | [protected] |
Set the tag names for formats such as XML.
array | $serializedResults |
Definition at line 207 of file ApiQueryORM.php.
References ApiBase\getResult(), and getRowName().
Referenced by addResults().