/**
* Add all items from $values into the result
- * @param array $result output
- * @param array $values values to add
- * @param string $flag the name of the boolean flag to mark this element
- * @param string $name if given, name of the value
+ * @param array $result Output
+ * @param array $values Values to add
+ * @param string $flag The name of the boolean flag to mark this element
+ * @param string $name If given, name of the value
*/
private static function addValues( array &$result, $values, $flag = null, $name = null ) {
foreach ( $values as $val ) {
$params = $this->extractRequestParams();
$rotation = $params['rotation'];
+ $this->getResult()->beginContinuation( $params['continue'], array(), array() );
+
$pageSet = $this->getPageSet();
$pageSet->execute();
$apiResult = $this->getResult();
$apiResult->setIndexedTagName( $result, 'page' );
$apiResult->addValue( null, $this->getModuleName(), $result );
+ $apiResult->endContinuation();
}
/**
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
),
+ 'continue' => '',
);
if ( $flags ) {
$result += $this->getPageSet()->getFinalParams( $flags );
return $pageSet->getFinalParamDescription() + array(
'rotation' => 'Degrees to rotate image clockwise',
'token' => 'Edit token. You can get one of these through action=tokens',
+ 'continue' => 'When more results are available, use this to continue',
);
}
return '';
}
- public function getPossibleErrors() {
- $pageSet = $this->getPageSet();
-
- return array_merge(
- parent::getPossibleErrors(),
- $pageSet->getFinalPossibleErrors()
- );
- }
-
public function getExamples() {
return array(
'api.php?action=imagerotate&titles=Example.jpg&rotation=90&token=123ABC',