|
MediaWiki REL1_35
|
This manages continuation state. More...
Public Member Functions | |
| __construct (ApiBase $module, array $allModules=[], array $generatedModules=[]) | |
| addContinueParam (ApiBase $module, $paramName, $paramValue) | |
| Set the continuation parameter for a module. | |
| addGeneratorContinueParam (ApiBase $module, $paramName, $paramValue) | |
| Set the continuation parameter for the generator module. | |
| addGeneratorNonContinueParam (ApiBase $module, $paramName, $paramValue) | |
| Set the non-continuation parameter for the generator module. | |
| getContinuation () | |
| Fetch continuation result data. | |
| getRawContinuation () | |
| Fetch raw continuation data. | |
| getRawNonContinuation () | |
| Fetch raw non-continuation data. | |
| getRunModules () | |
| Get the list of modules that should actually be run. | |
| getSource () | |
| Get the class that created this manager. | |
| isGeneratorDone () | |
| Is the generator done? | |
| setContinuationIntoResult (ApiResult $result) | |
| Store the continuation data into the result. | |
Private Attributes | |
| $allModules = [] | |
| array[] | $continuationData = [] |
| $generatedModules = [] | |
| $generatorContinuationData = [] | |
| $generatorDone = false | |
| $generatorNonContinuationData = [] | |
| $generatorParams = [] | |
| $source | |
This manages continuation state.
Definition at line 26 of file ApiContinuationManager.php.
| ApiContinuationManager::__construct | ( | ApiBase | $module, |
| array | $allModules = [], |
||
| array | $generatedModules = [] |
||
| ) |
| ApiBase | $module | Module starting the continuation |
| ApiBase[] | $allModules | Contains ApiBase instances that will be executed |
| array | $generatedModules | Names of modules that depend on the generator |
| ApiUsageException |
Definition at line 46 of file ApiContinuationManager.php.
References $allModules, $generatedModules, ApiBase\extractRequestParams(), ApiBase\getMain(), ApiBase\getModuleName(), and ContextSource\getRequest().
| ApiContinuationManager::addContinueParam | ( | ApiBase | $module, |
| $paramName, | |||
| $paramValue | |||
| ) |
Set the continuation parameter for a module.
| ApiBase | $module | |
| string | $paramName | |
| string | array | $paramValue |
| UnexpectedValueException |
Definition at line 123 of file ApiContinuationManager.php.
References ApiBase\encodeParamName(), and ApiBase\getModuleName().
| ApiContinuationManager::addGeneratorContinueParam | ( | ApiBase | $module, |
| $paramName, | |||
| $paramValue | |||
| ) |
Set the continuation parameter for the generator module.
| ApiBase | $module | |
| string | $paramName | |
| string | array | $paramValue |
Definition at line 170 of file ApiContinuationManager.php.
References ApiBase\encodeParamName(), and ApiBase\getModuleName().
| ApiContinuationManager::addGeneratorNonContinueParam | ( | ApiBase | $module, |
| $paramName, | |||
| $paramValue | |||
| ) |
Set the non-continuation parameter for the generator module.
In case the generator isn't going to be continued, this sets the fields to return.
| ApiBase | $module | |
| string | $paramName | |
| string | array | $paramValue |
Definition at line 155 of file ApiContinuationManager.php.
References ApiBase\encodeParamName(), and ApiBase\getModuleName().
| ApiContinuationManager::getContinuation | ( | ) |
Fetch continuation result data.
Definition at line 200 of file ApiContinuationManager.php.
References $continuationData, and $generatorParams.
Referenced by setContinuationIntoResult().
| ApiContinuationManager::getRawContinuation | ( | ) |
Fetch raw continuation data.
Definition at line 183 of file ApiContinuationManager.php.
| ApiContinuationManager::getRawNonContinuation | ( | ) |
Fetch raw non-continuation data.
Definition at line 192 of file ApiContinuationManager.php.
References $generatorNonContinuationData.
| ApiContinuationManager::getRunModules | ( | ) |
Get the list of modules that should actually be run.
Definition at line 112 of file ApiContinuationManager.php.
| ApiContinuationManager::getSource | ( | ) |
Get the class that created this manager.
Definition at line 96 of file ApiContinuationManager.php.
References $source.
| ApiContinuationManager::isGeneratorDone | ( | ) |
Is the generator done?
Definition at line 104 of file ApiContinuationManager.php.
References $generatorDone.
| ApiContinuationManager::setContinuationIntoResult | ( | ApiResult | $result | ) |
Store the continuation data into the result.
| ApiResult | $result |
Definition at line 261 of file ApiContinuationManager.php.
References ApiResult\addValue(), and getContinuation().
|
private |
Definition at line 29 of file ApiContinuationManager.php.
Referenced by __construct().
|
private |
Definition at line 33 of file ApiContinuationManager.php.
Referenced by getContinuation().
|
private |
Definition at line 30 of file ApiContinuationManager.php.
Referenced by __construct().
|
private |
Definition at line 34 of file ApiContinuationManager.php.
|
private |
Definition at line 38 of file ApiContinuationManager.php.
Referenced by isGeneratorDone().
|
private |
Definition at line 35 of file ApiContinuationManager.php.
Referenced by getRawNonContinuation().
|
private |
Definition at line 37 of file ApiContinuationManager.php.
Referenced by getContinuation().
|
private |
Definition at line 27 of file ApiContinuationManager.php.
Referenced by getSource().