FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Fossology\SpdxTwo\SpdxTwoUtils Class Reference

Utilities for SPDX2. More...

Collaboration diagram for Fossology\SpdxTwo\SpdxTwoUtils:
Collaboration graph

Static Public Member Functions

static preWorkOnArgsFlp ($args, $key1, $key2)
 For a given set of arguments assign $args[$key1] and $args[$key2]. More...
 
static addPrefixOnDemand ($license, $spdxValidityChecker=null)
 Add prefix to the license based on SPDX2 standards. More...
 
static addPrefixOnDemandKeys ($licenses, $spdxValidityChecker=null)
 Add prefix to license keys. More...
 
static addPrefixOnDemandList ($licenses, $spdxValidityChecker=null)
 Add prefix to license list. More...
 
static implodeLicenses ($licenses, $spdxValidityChecker=null)
 Implode licenses with "AND" or "OR". More...
 

Static Public Attributes

static $prefix = "LicenseRef-"
 Prefix to be used.
 

Detailed Description

Utilities for SPDX2.

Definition at line 25 of file spdx2utils.php.

Member Function Documentation

static Fossology\SpdxTwo\SpdxTwoUtils::addPrefixOnDemand (   $license,
  $spdxValidityChecker = null 
)
static

Add prefix to the license based on SPDX2 standards.

Parameters
string$license
callable$spdxValidityChecker
Returns
string

Definition at line 58 of file spdx2utils.php.

static Fossology\SpdxTwo\SpdxTwoUtils::addPrefixOnDemandKeys (   $licenses,
  $spdxValidityChecker = null 
)
static

Add prefix to license keys.

Parameters
array$licenses
callable$spdxValidityChecker
Returns
string[]

Definition at line 87 of file spdx2utils.php.

static Fossology\SpdxTwo\SpdxTwoUtils::addPrefixOnDemandList (   $licenses,
  $spdxValidityChecker = null 
)
static

Add prefix to license list.

Parameters
array$licenses
callable$spdxValidityChecker
Returns
array

Definition at line 102 of file spdx2utils.php.

static Fossology\SpdxTwo\SpdxTwoUtils::implodeLicenses (   $licenses,
  $spdxValidityChecker = null 
)
static

Implode licenses with "AND" or "OR".

Parameters
string$licenses
callable$spdxValidityChecker
Returns
string

Definition at line 116 of file spdx2utils.php.

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$argsString array
string$key1Key1
string$key2Key2
Returns
string[] $args

Definition at line 39 of file spdx2utils.php.


The documentation for this class was generated from the following file: