FOSSology
4.4.0
Open Source License Compliance by Open Source Software
GroupPermission.php
Go to the documentation of this file.
1
<?php
2
/*
3
SPDX-FileCopyrightText: © 2023 Divij Sharma <divijs75@gmail.com>
4
SPDX-License-Identifier: GPL-2.0-only
5
*/
10
namespace
Fossology\UI\Api\Models;
11
12
13
class
GroupPermission
14
{
19
private
$perm
;
24
private
$groupPk
;
29
private
$groupName
;
30
36
public
function
__construct
(
$perm
,
$groupPk
,
$groupName
)
37
{
38
$this->perm =
$perm
;
39
$this->groupPk =
$groupPk
;
40
$this->groupName =
$groupName
;
41
}
42
46
public
function
getPerm
()
47
{
48
return
$this->perm
;
49
}
50
54
public
function
getGroupPk
()
55
{
56
return
$this->groupPk
;
57
}
58
62
public
function
getGroupName
()
63
{
64
return
$this->groupName
;
65
}
66
67
68
74
public
function
getJSON
($version=ApiVersion::V1)
75
{
76
return
json_encode($this->
getArray
($version));
77
}
78
84
public
function
getArray
($version=ApiVersion::V1)
85
{
86
if
($version == ApiVersion::V2) {
87
return
[
88
'perm'
=> $this->
getPerm
(),
89
'groupPk'
=> $this->
getGroupPk
(),
90
'groupName'
=> $this->
getGroupName
()
91
];
92
}
93
return
[
94
'perm'
=> $this->
getPerm
(),
95
'group_pk'
=> $this->
getGroupPk
(),
96
'group_name'
=> $this->
getGroupName
()
97
];
98
}
99
103
public
function
setperm
(
$perm
)
104
{
105
$this->perm =
$perm
;
106
}
107
111
public
function
setGroupPk
(
$groupPk
)
112
{
113
$this->groupPk =
$groupPk
;
114
}
115
119
public
function
setGroupName
(
$groupName
)
120
{
121
$this->groupName =
$groupName
;
122
}
123
}
Fossology\UI\Api\Models\GroupPermission
Definition:
GroupPermission.php:14
Fossology\UI\Api\Models\GroupPermission\$groupPk
$groupPk
Definition:
GroupPermission.php:24
Fossology\UI\Api\Models\GroupPermission\getArray
getArray($version=ApiVersion::V1)
Definition:
GroupPermission.php:84
Fossology\UI\Api\Models\GroupPermission\__construct
__construct($perm, $groupPk, $groupName)
Definition:
GroupPermission.php:36
Fossology\UI\Api\Models\GroupPermission\getJSON
getJSON($version=ApiVersion::V1)
Definition:
GroupPermission.php:74
Fossology\UI\Api\Models\GroupPermission\getPerm
getPerm()
Definition:
GroupPermission.php:46
Fossology\UI\Api\Models\GroupPermission\getGroupPk
getGroupPk()
Definition:
GroupPermission.php:54
Fossology\UI\Api\Models\GroupPermission\setGroupName
setGroupName($groupName)
Definition:
GroupPermission.php:119
Fossology\UI\Api\Models\GroupPermission\setGroupPk
setGroupPk($groupPk)
Definition:
GroupPermission.php:111
Fossology\UI\Api\Models\GroupPermission\getGroupName
getGroupName()
Definition:
GroupPermission.php:62
Fossology\UI\Api\Models\GroupPermission\$groupName
$groupName
Definition:
GroupPermission.php:29
Fossology\UI\Api\Models\GroupPermission\$perm
$perm
Definition:
GroupPermission.php:19
Fossology\UI\Api\Models\GroupPermission\setperm
setperm($perm)
Definition:
GroupPermission.php:103
src
www
ui
api
Models
GroupPermission.php
Generated on Mon Nov 18 2024 07:37:14 for FOSSology by
1.9.1