PluginProbe
User Access Manager / 2.2.3
User Access Manager v2.2.3
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/Controller/Backend/AboutController.php +43 -2 2.3.132.2.3 View file →
@@ -1,5 +1,18 @@
1 1 <?php
2 +/**
3 + * AboutController.php
4 + *
5 + * The AboutController class file.
6 + *
7 + * PHP versions 5
8 + *
9 + * @author Alexander Schneider <alexanderschneider85@gmail.com>
10 + * @copyright 2008-2017 Alexander Schneider
11 + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
12 + * @version SVN: $id$
13 + * @link http://wordpress.org/extend/plugins/user-access-manager/
14 + */
2 15
3 16 declare(strict_types=1);
4 17
5 18 namespace UserAccessManager\Controller\Backend;
@@ -5,16 +18,32 @@
5 18 namespace UserAccessManager\Controller\Backend;
6 19
7 20 use UserAccessManager\Controller\Controller;
8 21
22 +/**
23 + * Class AboutController
24 + *
25 + * @package UserAccessManager\Controller
26 + */
9 27 class AboutController extends Controller
10 28 {
11 29 const SUPPORTER_FILE = 'supporters.json';
12 30 const SUPPORTER_FILE_URL = 'https://gm-alex.github.io/user-access-manager/supporters.json';
13 31
14 - protected ?string $template = 'AdminAbout.php';
15 - private ?array $supporters = null;
32 + /**
33 + * @var string
34 + */
35 + protected $template = 'AdminAbout.php';
16 36
37 + /**
38 + * @var null|array
39 + */
40 + private $supporters = null;
41 +
42 + /**
43 + * Returns all the supporters.
44 + * @return array
45 + */
17 46 private function getAllSupporters(): ?array
18 47 {
19 48 if ($this->supporters === null) {
20 49 $realPath = rtrim($this->wordpressConfig->getRealPath(), DIRECTORY_SEPARATOR);
@@ -36,8 +65,12 @@
36 65
37 66 return $this->supporters;
38 67 }
39 68
69 + /**
70 + * Returns the people which earn a special thanks.
71 + * @return array
72 + */
40 73 public function getSpecialThanks(): array
41 74 {
42 75 $supporters = $this->getAllSupporters();
43 76 return isset($supporters['special-thanks']) === true ? $supporters['special-thanks'] : [];
@@ -42,8 +75,12 @@
42 75 $supporters = $this->getAllSupporters();
43 76 return isset($supporters['special-thanks']) === true ? $supporters['special-thanks'] : [];
44 77 }
45 78
79 + /**
80 + * Returns the people which earn a special thanks.
81 + * @return array
82 + */
46 83 public function getTopSupporters(): array
47 84 {
48 85 $supporters = $this->getAllSupporters();
49 86 return isset($supporters['top-supporters']) === true ? $supporters['top-supporters'] : [];
@@ -48,8 +85,12 @@
48 85 $supporters = $this->getAllSupporters();
49 86 return isset($supporters['top-supporters']) === true ? $supporters['top-supporters'] : [];
50 87 }
51 88
89 + /**
90 + * Returns the people which earn a special thanks.
91 + * @return array
92 + */
52 93 public function getSupporters(): array
53 94 {
54 95 $supporters = $this->getAllSupporters();
55 96 return isset($supporters['supporters']) === true ? $supporters['supporters'] : [];