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