Web service utility class. More...
Public Member Functions | |
addQuery (TranslationQuery $query) | |
Register a query to be run. | |
getResponse ( $id) | |
Returns a response for a query. | |
run () | |
Runs all the queries. | |
Protected Member Functions | |
getMultiHttpQueries (array $queries) | |
Formats queries for format used by MultiHttpClient class. | |
Protected Attributes | |
array | $queries = [] |
array | $responses = [] |
float | $timeout = 0 |
bool | $hasRun = false |
Web service utility class.
Runs multiple web service queries asynchronously to save time.
Definition at line 17 of file QueryAggregator.php.
MediaWiki\Extension\Translate\WebService\QueryAggregator::addQuery | ( | TranslationQuery | $query | ) |
Register a query to be run.
Definition at line 27 of file QueryAggregator.php.
|
protected |
Formats queries for format used by MultiHttpClient class.
TranslationQuery[] | $queries |
Definition at line 74 of file QueryAggregator.php.
MediaWiki\Extension\Translate\WebService\QueryAggregator::getResponse | ( | $id | ) |
Returns a response for a query.
mixed | $id | Query id. |
RuntimeException | if called before run() has been called. |
Definition at line 39 of file QueryAggregator.php.
MediaWiki\Extension\Translate\WebService\QueryAggregator::run | ( | ) |
Runs all the queries.
Definition at line 48 of file QueryAggregator.php.
|
protected |
Definition at line 21 of file QueryAggregator.php.
|
protected |
Definition at line 18 of file QueryAggregator.php.
|
protected |
Definition at line 19 of file QueryAggregator.php.
|
protected |
Definition at line 20 of file QueryAggregator.php.