![]() |
FOSSology
4.6.0-rc1
Open Source License Compliance by Open Source Software
|
Import licenses from YAML. More...

Public Member Functions | |
| __construct (DbManager $dbManager, UserDao $userDao, LicenseDao $licenseDao, CompatibilityDao $compatibilityDao) | |
| handleFile ($filename) | |
| Read the YAML line by line and import it. More... | |
Protected Attributes | |
| $dbManager | |
| $userDao | |
| $licenseDao | |
| $compatibilityDao | |
| $alias | |
Private Member Functions | |
| handleYaml ($row) | |
| updateLicense ($row, $lrPk) | |
| Update the license info in the DB. More... | |
| handleYamlLicense ($row) | |
| Handle a single row from YAML. More... | |
| insertNewLicense ($row) | |
| Insert a new license in DB. More... | |
Import licenses from YAML.
Definition at line 25 of file LicenseCompatibilityRulesYamlImport.php.
| Fossology\Lib\Application\LicenseCompatibilityRulesYamlImport::__construct | ( | DbManager | $dbManager, |
| UserDao | $userDao, | ||
| LicenseDao | $licenseDao, | ||
| CompatibilityDao | $compatibilityDao | ||
| ) |
Constructor
| DbManager | $dbManager | DB manager to use |
| UserDao | $userDao | User Dao to use |
| LicenseDao | $licenseDao | License Dao to use |
| CompatibilityDao | $compatibilityDao | Compatibility DAO to use |
Definition at line 56 of file LicenseCompatibilityRulesYamlImport.php.
| Fossology\Lib\Application\LicenseCompatibilityRulesYamlImport::handleFile | ( | $filename | ) |
Read the YAML line by line and import it.
| string | $filename | Location of the YAML file. |
Read yaml: <count> licenses on success. Definition at line 72 of file LicenseCompatibilityRulesYamlImport.php.
|
private |
Handle a single row read from the YAML.
| array | $row | Single row from YAML |
Definition at line 102 of file LicenseCompatibilityRulesYamlImport.php.
|
private |
Handle a single row from YAML.
The function checks if the license data is already in the DB, then updates it. Otherwise, inserts new row in the DB.
| array | $row | YAML row to be inserted. |
Definition at line 172 of file LicenseCompatibilityRulesYamlImport.php.
|
private |
Insert a new license in DB.
| array | $row | Rows coming from YAML |
Definition at line 219 of file LicenseCompatibilityRulesYamlImport.php.
|
private |
Update the license info in the DB.
| array | $row | Row with new values. |
| int | $lrPk | Matched license ID. |
Definition at line 135 of file LicenseCompatibilityRulesYamlImport.php.
|
protected |
Definition at line 40 of file LicenseCompatibilityRulesYamlImport.php.
|
protected |
Compatibility DAO to use
Definition at line 38 of file LicenseCompatibilityRulesYamlImport.php.
|
protected |
DB manager to use
Definition at line 29 of file LicenseCompatibilityRulesYamlImport.php.
|
protected |
License DAO to use
Definition at line 35 of file LicenseCompatibilityRulesYamlImport.php.
|
protected |
User DAO to use
Definition at line 32 of file LicenseCompatibilityRulesYamlImport.php.