PluginProbe
User Access Manager / 2.2.10
User Access Manager v2.2.10
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
user-access-manager / src / Controller / Backend / ObjectInformation.php

ObjectInformation.php in User Access Manager 2.2.10, at src/Controller/Backend/ObjectInformation.php

129 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 */
15
16 declare(strict_types=1);
17
18 namespace UserAccessManager\Controller\Backend;
19
20 use UserAccessManager\UserGroup\AbstractUserGroup;
21
22 /**
23 * Class ObjectInformation
24 *
25 * @package UserAccessManager\Controller\Backend
26 */
27 class ObjectInformation
28 {
29 /**
30 * @var null|string
31 */
32 protected $objectType = null;
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 */
54 public function setObjectType(string $objectType): ObjectInformation
55 {
56 $this->objectType = $objectType;
57 return $this;
58 }
59
60 /**
61 * Returns the current object type.
62 * @return null|string
63 */
64 public function getObjectType(): ?string
65 {
66 return $this->objectType;
67 }
68
69 /**
70 * Sets the object id.
71 * @param $objectId
72 * @return $this
73 */
74 public function setObjectId($objectId): ObjectInformation
75 {
76 $this->objectId = $objectId;
77 return $this;
78 }
79
80 /**
81 * Returns the current object id.
82 * @return int|string|null
83 */
84 public function getObjectId()
85 {
86 return $this->objectId;
87 }
88
89 /**
90 * Sets the user group diff count.
91 * @param int $userGroupDiff
92 * @return $this
93 */
94 public function setUserGroupDiff(int $userGroupDiff): ObjectInformation
95 {
96 $this->userGroupDiff = $userGroupDiff;
97 return $this;
98 }
99
100 /**
101 * Returns the user group count diff.
102 * @return int
103 */
104 public function getUserGroupDiff(): int
105 {
106 return $this->userGroupDiff;
107 }
108
109 /**
110 * Sets the user group diff count.
111 * @param $objectUserGroups
112 * @return $this
113 */
114 public function setObjectUserGroups($objectUserGroups): ObjectInformation
115 {
116 $this->objectUserGroups = $objectUserGroups;
117 return $this;
118 }
119
120 /**
121 * Returns the current object user groups.
122 * @return AbstractUserGroup[]
123 */
124 public function getObjectUserGroups(): array
125 {
126 return $this->objectUserGroups;
127 }
128 }
129