Utilities for SPDX2.
More...
Utilities for SPDX2.
Definition at line 16 of file spdx2utils.php.
◆ addPrefixOnDemand()
static Fossology\SpdxTwo\SpdxTwoUtils::addPrefixOnDemand |
( |
|
$license | ) |
|
|
static |
Add prefix to the license based on SPDX2 standards.
- Parameters
-
- Returns
- string
Definition at line 46 of file spdx2utils.php.
◆ addPrefixOnDemandKeys()
static Fossology\SpdxTwo\SpdxTwoUtils::addPrefixOnDemandKeys |
( |
|
$licenses | ) |
|
|
static |
Add prefix to license keys.
- Parameters
-
- Returns
- string[]
Definition at line 69 of file spdx2utils.php.
◆ addPrefixOnDemandList()
static Fossology\SpdxTwo\SpdxTwoUtils::addPrefixOnDemandList |
( |
|
$licenses | ) |
|
|
static |
Add prefix to license list.
- Parameters
-
- Returns
- array
Definition at line 83 of file spdx2utils.php.
◆ cleanTextArray()
static Fossology\SpdxTwo\SpdxTwoUtils::cleanTextArray |
( |
|
$texts | ) |
|
|
static |
Clean an array of strings by trimming the elements and removing empty strings.
- Parameters
-
string[] | $texts | Array of texts to be concatenated. |
- Returns
- string[] String array with all trimmed string elements.
Definition at line 123 of file spdx2utils.php.
◆ implodeLicenses()
static Fossology\SpdxTwo\SpdxTwoUtils::implodeLicenses |
( |
|
$licenses | ) |
|
|
static |
Implode licenses with "AND" or "OR".
- Parameters
-
- Returns
- string
Definition at line 96 of file spdx2utils.php.
◆ preWorkOnArgsFlp()
static Fossology\SpdxTwo\SpdxTwoUtils::preWorkOnArgsFlp |
( |
|
$args, |
|
|
|
$key1, |
|
|
|
$key2 |
|
) |
| |
|
static |
For a given set of arguments assign $args[$key1] and $args[$key2].
Get the array of arguments and find $key1 and $key2 values and assign to $args[$key1] and $args[$key2].
- Parameters
-
string[] | $args | String array |
string | $key1 | Key1 |
string | $key2 | Key2 |
- Returns
- string[] $args
Definition at line 28 of file spdx2utils.php.
◆ removeEmptyLicenses()
static Fossology\SpdxTwo\SpdxTwoUtils::removeEmptyLicenses |
( |
|
$licenses | ) |
|
|
static |
Remove empty and 'NOASSERTION' licenses from list.
- Parameters
-
string[] | $licenses | List of licenses. |
- Returns
- array List of licenses removing empty and 'NOASSERTION's.
Definition at line 147 of file spdx2utils.php.
The documentation for this class was generated from the following file: