FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Application\LicenseCsvExport Class Reference

Helper class to export license list as a CSV from the DB. More...

Collaboration diagram for Fossology\Lib\Application\LicenseCsvExport:
Collaboration graph

Public Member Functions

 __construct (DbManager $dbManager)
 
 setDelimiter ($delimiter=',')
 Update the delimiter. More...
 
 setEnclosure ($enclosure='"')
 Update the enclosure. More...
 
 createCsv ($rf=0, $allCandidates=false, $generateJson=false)
 Create the CSV from the DB. More...
 

Protected Attributes

 $dbManager
 
 $delimiter = ','
 
 $enclosure = '"'
 

Detailed Description

Helper class to export license list as a CSV from the DB.

Definition at line 24 of file LicenseCsvExport.php.

Constructor & Destructor Documentation

◆ __construct()

Fossology\Lib\Application\LicenseCsvExport::__construct ( DbManager  $dbManager)

Constructor

Parameters
DbManager$dbManagerDB manager to use.

Definition at line 40 of file LicenseCsvExport.php.

Member Function Documentation

◆ createCsv()

Fossology\Lib\Application\LicenseCsvExport::createCsv (   $rf = 0,
  $allCandidates = false,
  $generateJson = false 
)

Create the CSV from the DB.

Parameters
int$rfSet the license ID to get only one license, set 0 to get all
Returns
string csv

Definition at line 68 of file LicenseCsvExport.php.

◆ setDelimiter()

Fossology\Lib\Application\LicenseCsvExport::setDelimiter (   $delimiter = ',')

Update the delimiter.

Parameters
string$delimiterNew delimiter to use.

Definition at line 49 of file LicenseCsvExport.php.

◆ setEnclosure()

Fossology\Lib\Application\LicenseCsvExport::setEnclosure (   $enclosure = '"')

Update the enclosure.

Parameters
string$enclosureNew enclosure to use.

Definition at line 58 of file LicenseCsvExport.php.

Member Data Documentation

◆ $dbManager

DbManager Fossology\Lib\Application\LicenseCsvExport::$dbManager
protected

DB manager in use

Definition at line 28 of file LicenseCsvExport.php.

◆ $delimiter

string Fossology\Lib\Application\LicenseCsvExport::$delimiter = ','
protected

Delimiter for CSV

Definition at line 31 of file LicenseCsvExport.php.

◆ $enclosure

string Fossology\Lib\Application\LicenseCsvExport::$enclosure = '"'
protected

Enclosure for CSV strings

Definition at line 34 of file LicenseCsvExport.php.


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