FOSSology  4.4.0
Open Source License Compliance by Open Source Software
exportLicenseRef Class Reference
Collaboration diagram for exportLicenseRef:
Collaboration graph

Public Member Functions

 startProcessingLicenseData ()
 
 getListSPDX ($type, $URL, $updateWithNew, $updateExisting, $addNewLicense, $existingLicenseRefData, $deleteDeprecated)
 get SPDX license or exception list and update licenseref.json More...
 

Private Member Functions

 replaceUnicode ($text)
 
 sanitizeRefData (&$newLicenseRefData)
 

Private Attributes

 $mapArrayData
 

Detailed Description

Definition at line 17 of file exportLicenseRefUsingSPDX.php.

Member Function Documentation

◆ getListSPDX()

exportLicenseRef::getListSPDX (   $type,
  $URL,
  $updateWithNew,
  $updateExisting,
  $addNewLicense,
  $existingLicenseRefData,
  $deleteDeprecated 
)

get SPDX license or exception list and update licenseref.json

get SPDX license or exception list update the licenseref.json file with changes in existing license text or add a new license if licenseref.json doesn't contain it. Create a new licenserefnew.json file from where it is getting executed. user need to copy the additional license texts from licenserefnew.json to actual licenseref.json

Definition at line 138 of file exportLicenseRefUsingSPDX.php.

◆ replaceUnicode()

exportLicenseRef::replaceUnicode (   $text)
private

Replace common unicode characters with ASCII for consistent results.

Parameters
string$textInput text
Returns
string Input with characters replaced

Definition at line 259 of file exportLicenseRefUsingSPDX.php.

◆ sanitizeRefData()

exportLicenseRef::sanitizeRefData ( $newLicenseRefData)
private

Santize the license ref data before writing to JSON file

Parameters
[in,out]array$newLicenseRefDataLicense ref data to be sanitized

Definition at line 293 of file exportLicenseRefUsingSPDX.php.

Member Data Documentation

◆ $mapArrayData

array exportLicenseRef::$mapArrayData
private
Initial value:
= array(
'licenses' => array('licenseId', 'licenseText', 'name'),
'exceptions' => array('licenseExceptionId', 'licenseExceptionText', 'name')
)

actual names for license/exception in SPDX for text and licenseid

Definition at line 23 of file exportLicenseRefUsingSPDX.php.


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