FOSSology
4.4.0
Open Source License Compliance by Open Source Software
License.php
1
<?php
2
/*
3
SPDX-FileCopyrightText: © 2014 Siemens AG
4
Authors: Johannes Najjar, Andreas Würl
5
6
SPDX-License-Identifier: GPL-2.0-only
7
*/
8
9
namespace
Fossology\Lib\Data;
10
11
class
License
extends
LicenseRef
12
{
16
private
$text;
20
private
$url;
24
private
$risk;
28
private
$detectorType;
32
private
$spdxId;
33
34
function
__construct($id, $shortName, $fullName, $risk, $text, $url, $detectorType, $spdxId =
null
)
35
{
36
parent::__construct($id, $shortName, $fullName, $spdxId);
37
$this->text = $text;
38
$this->url = $url;
39
$this->risk = $risk;
40
$this->detectorType = $detectorType;
41
$this->spdxId = $spdxId;
42
}
43
47
public
function
getRisk
()
48
{
49
return
$this->risk;
50
}
51
55
public
function
getDetectorType
()
56
{
57
return
$this->detectorType;
58
}
59
63
public
function
getSpdxId
()
64
{
65
return
LicenseRef::convertToSpdxId
($this->
getShortName
(), $this->spdxId);
66
}
67
71
public
function
getText
()
72
{
73
return
$this->text;
74
}
75
79
public
function
getUrl
()
80
{
81
return
$this->url;
82
}
83
85
public
function
getRef
()
86
{
87
return
new
parent($this->
getId
(), $this->
getShortName
(),
88
$this->
getFullName
(), $this->
getSpdxId
());
89
}
90
}
Fossology\Lib\Data\LicenseRef
Definition:
LicenseRef.php:15
Fossology\Lib\Data\LicenseRef\convertToSpdxId
static convertToSpdxId($shortname, $spdxId)
Given a license's shortname and spdx id, give out spdx id to use in reports.
Definition:
LicenseRef.php:106
Fossology\Lib\Data\LicenseRef\getFullName
getFullName()
Definition:
LicenseRef.php:64
Fossology\Lib\Data\LicenseRef\getShortName
getShortName()
Definition:
LicenseRef.php:72
Fossology\Lib\Data\LicenseRef\getId
getId()
Definition:
LicenseRef.php:56
Fossology\Lib\Data\License
Definition:
License.php:12
Fossology\Lib\Data\License\getRisk
getRisk()
Definition:
License.php:47
Fossology\Lib\Data\License\getSpdxId
getSpdxId()
Definition:
License.php:63
Fossology\Lib\Data\License\getText
getText()
Definition:
License.php:71
Fossology\Lib\Data\License\getDetectorType
getDetectorType()
Definition:
License.php:55
Fossology\Lib\Data\License\getUrl
getUrl()
Definition:
License.php:79
Fossology\Lib\Data\License\getRef
getRef()
Definition:
License.php:85
src
lib
php
Data
License.php
Generated on Mon Nov 18 2024 07:37:13 for FOSSology by
1.9.1