FOSSology
4.4.0
Open Source License Compliance by Open Source Software
LicenseStandardComment.php
Go to the documentation of this file.
1
<?php
2
/*
3
SPDX-FileCopyrightText: © 2024 Divij Sharma <divijs75@gmail.com>
4
SPDX-License-Identifier: GPL-2.0-only
5
*/
10
namespace
Fossology\UI\Api\Models;
11
12
13
class
LicenseStandardComment
14
{
19
private
$id
;
24
private
$name
;
29
private
$comment
;
34
private
$isEnabled
;
35
42
public
function
__construct
(
$id
,
$name
,
$comment
,
$isEnabled
)
43
{
44
$this->
id
=
$id
;
45
$this->name =
$name
;
46
$this->comment =
$comment
;
47
$this->isEnabled =
$isEnabled
;
48
}
49
53
public
function
getId
()
54
{
55
return
$this->id
;
56
}
57
61
public
function
getName
()
62
{
63
return
$this->name
;
64
}
65
69
public
function
getComment
()
70
{
71
return
$this->comment
;
72
}
73
77
public
function
getIsEnabled
()
78
{
79
return
$this->isEnabled
;
80
}
81
82
83
89
public
function
getJSON
($version=ApiVersion::V1)
90
{
91
return
json_encode($this->
getArray
($version));
92
}
93
99
public
function
getArray
($version=ApiVersion::V1)
100
{
101
if
($version == ApiVersion::V2) {
102
return
[
103
'id'
=> $this->
getId
(),
104
'name'
=> $this->
getName
(),
105
'comment'
=> $this->
getComment
(),
106
'isEnabled'
=> $this->
getIsEnabled
()
107
];
108
}
109
return
[
110
'id'
=> $this->
getId
(),
111
'name'
=> $this->
getName
(),
112
'comment'
=> $this->
getComment
(),
113
'is_enabled'
=> $this->
getIsEnabled
()
114
];
115
}
116
120
public
function
setId
(
$id
)
121
{
122
$this->
id
=
$id
;
123
}
124
128
public
function
setName
(
$name
)
129
{
130
$this->name =
$name
;
131
}
132
136
public
function
setComment
(
$comment
)
137
{
138
$this->comment =
$comment
;
139
}
140
144
public
function
setIsEnabled
(
$isEnabled
)
145
{
146
$this->isEnabled =
$isEnabled
;
147
}
148
}
Fossology\UI\Api\Models\LicenseStandardComment
Definition:
LicenseStandardComment.php:14
Fossology\UI\Api\Models\LicenseStandardComment\getJSON
getJSON($version=ApiVersion::V1)
Definition:
LicenseStandardComment.php:89
Fossology\UI\Api\Models\LicenseStandardComment\$name
$name
Definition:
LicenseStandardComment.php:24
Fossology\UI\Api\Models\LicenseStandardComment\getComment
getComment()
Definition:
LicenseStandardComment.php:69
Fossology\UI\Api\Models\LicenseStandardComment\getName
getName()
Definition:
LicenseStandardComment.php:61
Fossology\UI\Api\Models\LicenseStandardComment\getArray
getArray($version=ApiVersion::V1)
Definition:
LicenseStandardComment.php:99
Fossology\UI\Api\Models\LicenseStandardComment\getId
getId()
Definition:
LicenseStandardComment.php:53
Fossology\UI\Api\Models\LicenseStandardComment\$isEnabled
$isEnabled
Definition:
LicenseStandardComment.php:34
Fossology\UI\Api\Models\LicenseStandardComment\$comment
$comment
Definition:
LicenseStandardComment.php:29
Fossology\UI\Api\Models\LicenseStandardComment\setId
setId($id)
Definition:
LicenseStandardComment.php:120
Fossology\UI\Api\Models\LicenseStandardComment\__construct
__construct($id, $name, $comment, $isEnabled)
Definition:
LicenseStandardComment.php:42
Fossology\UI\Api\Models\LicenseStandardComment\setComment
setComment($comment)
Definition:
LicenseStandardComment.php:136
Fossology\UI\Api\Models\LicenseStandardComment\setIsEnabled
setIsEnabled($isEnabled)
Definition:
LicenseStandardComment.php:144
Fossology\UI\Api\Models\LicenseStandardComment\$id
$id
Definition:
LicenseStandardComment.php:19
Fossology\UI\Api\Models\LicenseStandardComment\getIsEnabled
getIsEnabled()
Definition:
LicenseStandardComment.php:77
Fossology\UI\Api\Models\LicenseStandardComment\setName
setName($name)
Definition:
LicenseStandardComment.php:128
src
www
ui
api
Models
LicenseStandardComment.php
Generated on Mon Nov 18 2024 07:37:14 for FOSSology by
1.9.1