MediaWiki  REL1_22
ApiQueryORM Class Reference
Inheritance diagram for ApiQueryORM:
Collaboration diagram for ApiQueryORM:

List of all members.

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.

Detailed Description

Definition at line 29 of file ApiQueryORM.php.


Member Function Documentation

ApiQueryORM::addResults ( array params,
ORMResult results 
) [protected]

Serialize the results and add them to the result object.

Since:
1.21
Parameters:
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.

Since:
1.21
Parameters:
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.

Since:
1.21

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.

Since:
1.21
Parameters:
IORMRow$result
array$params
Returns:
mixed

Definition at line 196 of file ApiQueryORM.php.

References IORMRow\toArray().

Referenced by addResults().

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.

Since:
1.21
Parameters:
array$params
Returns:
array

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.

Since:
1.21
Returns:
string

Definition at line 64 of file ApiQueryORM.php.

Referenced by addSerializedResults().

See also:
ApiBase::getParamDescription()
Returns:
array

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).

Since:
1.21
Returns:
array

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.

Since:
1.21
Returns:
null|string|array

Definition at line 75 of file ApiQueryORM.php.

Referenced by addSerializedResults().

ApiQueryORM::getResults ( array params,
array conditions 
) [protected]

Get the actual results.

Since:
1.21
Parameters:
array$params
array$conditions
Returns:
ORMResult

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.

Since:
1.21
Returns:
string

Definition at line 50 of file ApiQueryORM.php.

Referenced by setIndexedTagNames().

ApiQueryORM::getTable ( ) [abstract, protected]

Returns an instance of the IORMTable table being queried.

Since:
1.21
Returns:
IORMTable

Referenced by getAllowedParams(), getConditions(), getParamDescription(), and getResults().

ApiQueryORM::setIndexedTagNames ( array &$  serializedResults) [protected]

Set the tag names for formats such as XML.

Since:
1.21
Parameters:
array$serializedResults

Definition at line 207 of file ApiQueryORM.php.

References ApiBase\getResult(), and getRowName().

Referenced by addResults().


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