blob: 715e3c02f68bafd6d9889bf7fcaa27d28a570557 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<?php
namespace Mediawiki\Api\Generator;
/**
* @access public
*
* @author Addshore
*
* @since 0.5.1
*/
class AnonymousGenerator implements ApiGenerator {
/**
* @var string
*/
private $name;
/**
* @var array
*/
private $params;
/**
* @param string $name
* @param array $params including 'g' prefix keys
*/
public function __construct( $name, array $params ) {
$this->name = $name;
$this->params = $params;
}
/**
* @return array
*/
public function getParams() {
$params = $this->params;
$params['generator'] = $this->name;
return $params;
}
}
|