|
const | SPDXREF_PREFIX = "LicenseRef-" |
|
const | SPDXREF_PREFIX_FOSSOLOGY = "LicenseRef-fossology-" |
|
|
| $id |
|
| $shortName |
|
| $fullName |
|
| $spdxId |
|
Definition at line 14 of file LicenseRef.php.
◆ __construct()
Fossology\Lib\Data\LicenseRef::__construct |
( |
|
$licenseId, |
|
|
|
$licenseShortName, |
|
|
|
$licenseName, |
|
|
|
$spdxId |
|
) |
| |
- Parameters
-
| $licenseId | |
| $licenseShortName | |
| $licenseName | |
string | $spdxId | |
Definition at line 45 of file LicenseRef.php.
◆ convertToSpdxId()
static Fossology\Lib\Data\LicenseRef::convertToSpdxId |
( |
|
$shortname, |
|
|
|
$spdxId |
|
) |
| |
|
static |
Given a license's shortname and spdx id, give out spdx id to use in reports.
- In case, the shortname is special, return as is.
- In case spdx id is empty, return shortname with spdx prefix.
- Otherwise use the provided spdx id
- Parameters
-
string | $shortname | License's shortname from DB |
string | null | $spdxId | License's spdx id from DB |
- Returns
- string
Definition at line 106 of file LicenseRef.php.
◆ getFullName()
Fossology\Lib\Data\LicenseRef::getFullName |
( |
| ) |
|
◆ getId()
Fossology\Lib\Data\LicenseRef::getId |
( |
| ) |
|
◆ getShortName()
Fossology\Lib\Data\LicenseRef::getShortName |
( |
| ) |
|
◆ getSpdxId()
Fossology\Lib\Data\LicenseRef::getSpdxId |
( |
| ) |
|
◆ replaceSpaces()
static Fossology\Lib\Data\LicenseRef::replaceSpaces |
( |
|
$licenseName | ) |
|
|
static |
Replace all spaces with '-' if they are not surrounding 'AND', 'WITH' or 'OR'
- Parameters
-
string | $licenseName | SPDX expression |
- Returns
- string SPDX expression with space replaced with dash
Definition at line 132 of file LicenseRef.php.
The documentation for this class was generated from the following file: