summaryrefslogtreecommitdiff
path: root/bin/wiki/vendor/addwiki/mediawiki-api/src/Generator/AnonymousGenerator.php
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
committerYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
commitfc7369835258467bf97eb64f184b93691f9a9fd5 (patch)
treedaabd60089d2dd76d9f5fb416b005fbe159c799d /bin/wiki/vendor/addwiki/mediawiki-api/src/Generator/AnonymousGenerator.php
first commit
Diffstat (limited to 'bin/wiki/vendor/addwiki/mediawiki-api/src/Generator/AnonymousGenerator.php')
-rw-r--r--bin/wiki/vendor/addwiki/mediawiki-api/src/Generator/AnonymousGenerator.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/bin/wiki/vendor/addwiki/mediawiki-api/src/Generator/AnonymousGenerator.php b/bin/wiki/vendor/addwiki/mediawiki-api/src/Generator/AnonymousGenerator.php
new file mode 100644
index 00000000..715e3c02
--- /dev/null
+++ b/bin/wiki/vendor/addwiki/mediawiki-api/src/Generator/AnonymousGenerator.php
@@ -0,0 +1,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;
+ }
+}