summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryImages.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiQueryImages.php')
-rw-r--r--includes/api/ApiQueryImages.php30
1 files changed, 12 insertions, 18 deletions
diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php
index f2bf0a7b..9bc3abed 100644
--- a/includes/api/ApiQueryImages.php
+++ b/includes/api/ApiQueryImages.php
@@ -32,7 +32,7 @@
*/
class ApiQueryImages extends ApiQueryGeneratorBase {
- public function __construct( $query, $moduleName ) {
+ public function __construct( ApiQuery $query, $moduleName ) {
parent::__construct( $query, $moduleName, 'im' );
}
@@ -45,7 +45,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
}
/**
- * @param $resultPageSet ApiPageSet
+ * @param ApiPageSet $resultPageSet
*/
private function run( $resultPageSet = null ) {
if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
@@ -79,9 +79,9 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
$this->addOption( 'ORDER BY', 'il_to' . $sort );
} else {
$this->addOption( 'ORDER BY', array(
- 'il_from' . $sort,
- 'il_to' . $sort
- ));
+ 'il_from' . $sort,
+ 'il_to' . $sort
+ ) );
}
$this->addOption( 'LIMIT', $params['limit'] + 1 );
@@ -164,28 +164,22 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
return array(
'limit' => 'How many images to return',
'continue' => 'When more results are available, use this to continue',
- 'images' => 'Only list these images. Useful for checking whether a certain page has a certain Image.',
+ 'images' => 'Only list these images. Useful for checking whether a ' .
+ 'certain page has a certain Image.',
'dir' => 'The direction in which to list',
);
}
- public function getResultProperties() {
- return array(
- '' => array(
- 'ns' => 'namespace',
- 'title' => 'string'
- )
- );
- }
-
public function getDescription() {
- return 'Returns all images contained on the given page(s)';
+ return 'Returns all images contained on the given page(s).';
}
public function getExamples() {
return array(
- 'api.php?action=query&prop=images&titles=Main%20Page' => 'Get a list of images used in the [[Main Page]]',
- 'api.php?action=query&generator=images&titles=Main%20Page&prop=info' => 'Get information about all images used in the [[Main Page]]',
+ 'api.php?action=query&prop=images&titles=Main%20Page'
+ => 'Get a list of images used in the [[Main Page]]',
+ 'api.php?action=query&generator=images&titles=Main%20Page&prop=info'
+ => 'Get information about all images used in the [[Main Page]]',
);
}