FOSSology
4.4.0
Open Source License Compliance by Open Source Software
EditedLicense.php
Go to the documentation of this file.
1
<?php
2
/*
3
SPDX-FileCopyrightText: © 2023 Akash Kumar Sah <akashsah2003@gmail.com>
4
SPDX-License-Identifier: GPL-2.0-only
5
*/
10
namespace
Fossology\UI\Api\Models;
11
12
class
EditedLicense
13
{
18
private
$id
;
23
private
$shortName
;
28
private
$count
;
33
private
$spdxId
;
34
41
public
function
__construct
(
$id
,
$shortName
,
$count
,
$spdxId
)
42
{
43
$this->
id
=
$id
;
44
$this->shortName =
$shortName
;
45
$this->count =
$count
;
46
$this->spdxId =
$spdxId
;
47
}
48
52
public
function
getId
()
53
{
54
return
$this->id
;
55
}
56
60
public
function
getShortName
()
61
{
62
return
$this->shortName
;
63
}
64
68
public
function
getCount
()
69
{
70
return
$this->count
;
71
}
72
76
public
function
getSpdxId
()
77
{
78
return
$this->spdxId
;
79
}
80
86
public
function
getJSON
($version=ApiVersion::V1)
87
{
88
return
json_encode($this->
getArray
($version));
89
}
90
96
public
function
getArray
($version=ApiVersion::V1)
97
{
98
if
($version == ApiVersion::V2) {
99
return
[
100
'id'
=> $this->
getId
(),
101
'shortName'
=> $this->
getShortName
(),
102
'count'
=> $this->
getCount
(),
103
'spdxId'
=> $this->
getSpdxId
()
104
];
105
}
106
return
[
107
'id'
=> $this->
getId
(),
108
'shortName'
=> $this->
getShortName
(),
109
'count'
=> $this->
getCount
(),
110
'spdx_id'
=> $this->
getSpdxId
()
111
];
112
}
113
117
public
function
setId
(
$id
)
118
{
119
$this->
id
=
$id
;
120
}
121
125
public
function
setShortName
(
$shortName
)
126
{
127
$this->shortName =
$shortName
;
128
}
129
133
public
function
setCount
(
$count
)
134
{
135
$this->count =
$count
;
136
}
137
141
public
function
setSpdxId
(
$spdxId
)
142
{
143
$this->spdxId =
$spdxId
;
144
}
145
}
Fossology\UI\Api\Models\EditedLicense
Definition:
EditedLicense.php:13
Fossology\UI\Api\Models\EditedLicense\$id
$id
Definition:
EditedLicense.php:18
Fossology\UI\Api\Models\EditedLicense\getShortName
getShortName()
Definition:
EditedLicense.php:60
Fossology\UI\Api\Models\EditedLicense\getId
getId()
Definition:
EditedLicense.php:52
Fossology\UI\Api\Models\EditedLicense\setId
setId($id)
Definition:
EditedLicense.php:117
Fossology\UI\Api\Models\EditedLicense\setCount
setCount($count)
Definition:
EditedLicense.php:133
Fossology\UI\Api\Models\EditedLicense\$count
$count
Definition:
EditedLicense.php:28
Fossology\UI\Api\Models\EditedLicense\getJSON
getJSON($version=ApiVersion::V1)
Definition:
EditedLicense.php:86
Fossology\UI\Api\Models\EditedLicense\getArray
getArray($version=ApiVersion::V1)
Definition:
EditedLicense.php:96
Fossology\UI\Api\Models\EditedLicense\getCount
getCount()
Definition:
EditedLicense.php:68
Fossology\UI\Api\Models\EditedLicense\setShortName
setShortName($shortName)
Definition:
EditedLicense.php:125
Fossology\UI\Api\Models\EditedLicense\$shortName
$shortName
Definition:
EditedLicense.php:23
Fossology\UI\Api\Models\EditedLicense\__construct
__construct($id, $shortName, $count, $spdxId)
Definition:
EditedLicense.php:41
Fossology\UI\Api\Models\EditedLicense\getSpdxId
getSpdxId()
Definition:
EditedLicense.php:76
Fossology\UI\Api\Models\EditedLicense\$spdxId
$spdxId
Definition:
EditedLicense.php:33
Fossology\UI\Api\Models\EditedLicense\setSpdxId
setSpdxId($spdxId)
Definition:
EditedLicense.php:141
src
www
ui
api
Models
EditedLicense.php
Generated on Mon Nov 18 2024 07:37:14 for FOSSology by
1.9.1