File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use dokuwiki \Extension \RemotePlugin ;
4
+
5
+ class remote_plugin_farmer extends RemotePlugin {
6
+ /** @var helper_plugin_farmer hlp */
7
+ protected $ helper ;
8
+
9
+ /**
10
+ * remote_plugin_struct constructor.
11
+ */
12
+ public function __construct ()
13
+ {
14
+ parent ::__construct ();
15
+
16
+ $ this ->helper = plugin_load ('helper ' , 'farmer ' );
17
+ }
18
+
19
+ public function getHostname () {
20
+ return $ this ->helper ->getConfig ()['base ' ]['farmhost ' ];
21
+ }
22
+
23
+ public function getBaseDomain () {
24
+ return $ this ->helper ->getConfig ()['base ' ]['basedomain ' ];
25
+ }
26
+
27
+ public function listAnimals () {
28
+ return $ this ->helper ->getAllAnimals ();
29
+ }
30
+
31
+ public function listAnimalUrls () {
32
+ foreach ($ this ->helper ->getAllAnimals () as $ animal ) {
33
+ $ animalUrls [] = $ this ->helper ->getAnimalURL ($ animal );
34
+ }
35
+ return $ animalUrls ;
36
+ }
37
+ }
You can’t perform that action at this time.
0 commit comments