40 $this->obligationMap = $GLOBALS[
'container']->get(
'businessrules.obligationmap');
69 $sql =
"SELECT ob_pk,ob_type,ob_topic,ob_text,ob_classification,ob_modifications,ob_comment
72 $stmt = __METHOD__.
'.ob';
73 $sql .=
' WHERE ob_pk=$1;';
74 $row = $this->
dbManager->getSingleRow($sql, [$ob], $stmt);
75 $liclist = $this->obligationMap->getLicenseList($ob);
76 $candidatelist = $this->obligationMap->getLicenseList($ob, True);
79 $row[] = $candidatelist;
88 foreach ($vars as $row) {
89 $liclist = $this->obligationMap->getLicenseList($row[
'ob_pk']);
90 $candidatelist = $this->obligationMap->getLicenseList($row[
'ob_pk'], True);
93 $row[] = $candidatelist;
98 $out = fopen(
'php://output',
'w');
100 $head = array(
'Type',
'Obligation or Risk topic',
'Full Text',
'Classification',
'Apply on modified source code',
'Comment',
'Associated Licenses',
'Associated candidate Licenses');
101 fputcsv($out, $head, $this->delimiter, $this->enclosure);
102 foreach ($csvarray as $row) {
103 fputcsv($out, $row, $this->delimiter, $this->enclosure);
105 $content = ob_get_contents();
Helper class to export obligations as a CSV.
setDelimiter($delimiter=',')
Update the delimiter.
__construct(DbManager $dbManager)
setEnclosure($enclosure='"')
Update the enclosure.
createCsv($ob=0)
Create CSV from the obligations.
fo_dbManager * dbManager
fo_dbManager object
Utility functions for specific applications.