PluginProbe
User Access Manager / 2.2.23
User Access Manager v2.2.23
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/ObjectInformation.php +70 -7 2.3.132.2.23 View file →
@@ -1,5 +1,18 @@
1 1 <?php
2 +/**
3 + * ObjectInformation.php
4 + *
5 + * The ObjectInformation 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,18 +18,40 @@
5 18 namespace UserAccessManager\Controller\Backend;
6 19
7 20 use UserAccessManager\UserGroup\AbstractUserGroup;
8 21
22 +/**
23 + * Class ObjectInformation
24 + *
25 + * @package UserAccessManager\Controller\Backend
26 + */
9 27 class ObjectInformation
10 28 {
11 - protected ?string $objectType = null;
12 - protected int|string|null $objectId = null;
13 - protected int $userGroupDiff = 0;
14 29 /**
15 - * @var AbstractUserGroup[]
30 + * @var null|string
16 31 */
17 - protected array $objectUserGroups = [];
32 + protected $objectType = null;
18 33
34 + /**
35 + * @var null|string
36 + */
37 + protected $objectId = null;
38 +
39 + /**
40 + * @var int
41 + */
42 + protected $userGroupDiff = 0;
43 +
44 + /**
45 + * @var AbstractUserGroup[]
46 + */
47 + protected $objectUserGroups = [];
48 +
49 + /**
50 + * Sets the object type.
51 + * @param string $objectType
52 + * @return $this
53 + */
19 54 public function setObjectType(string $objectType): ObjectInformation
20 55 {
21 56 $this->objectType = $objectType;
22 57 return $this;
@@ -21,24 +56,42 @@
21 56 $this->objectType = $objectType;
22 57 return $this;
23 58 }
24 59
60 + /**
61 + * Returns the current object type.
62 + * @return null|string
63 + */
25 64 public function getObjectType(): ?string
26 65 {
27 66 return $this->objectType;
28 67 }
29 68
30 - public function setObjectId(int|string|null $objectId): ObjectInformation
69 + /**
70 + * Sets the object id.
71 + * @param $objectId
72 + * @return $this
73 + */
74 + public function setObjectId($objectId): ObjectInformation
31 75 {
32 76 $this->objectId = $objectId;
33 77 return $this;
34 78 }
35 79
36 - public function getObjectId(): int|string|null
80 + /**
81 + * Returns the current object id.
82 + * @return int|string|null
83 + */
84 + public function getObjectId()
37 85 {
38 86 return $this->objectId;
39 87 }
40 88
89 + /**
90 + * Sets the user group diff count.
91 + * @param int $userGroupDiff
92 + * @return $this
93 + */
41 94 public function setUserGroupDiff(int $userGroupDiff): ObjectInformation
42 95 {
43 96 $this->userGroupDiff = $userGroupDiff;
44 97 return $this;
@@ -43,13 +96,22 @@
43 96 $this->userGroupDiff = $userGroupDiff;
44 97 return $this;
45 98 }
46 99
100 + /**
101 + * Returns the user group count diff.
102 + * @return int
103 + */
47 104 public function getUserGroupDiff(): int
48 105 {
49 106 return $this->userGroupDiff;
50 107 }
51 108
109 + /**
110 + * Sets the user group diff count.
111 + * @param $objectUserGroups
112 + * @return $this
113 + */
52 114 public function setObjectUserGroups($objectUserGroups): ObjectInformation
53 115 {
54 116 $this->objectUserGroups = $objectUserGroups;
55 117 return $this;
@@ -55,8 +117,9 @@
55 117 return $this;
56 118 }
57 119
58 120 /**
121 + * Returns the current object user groups.
59 122 * @return AbstractUserGroup[]
60 123 */
61 124 public function getObjectUserGroups(): array
62 125 {