FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Public Member Functions | |
__construct (DbManager $dbManager, Logger $logger, LicenseDao $licenseDao, AgentDao $agentDao) | |
getAllRules ($limit=10, $offset=0, $searchTerm='') | |
Get all the existing license compatibility rules from the database. More... | |
getTotalRulesCount ($searchTerm='') | |
Get the total count of license compatibility rules. More... | |
insertEmptyRule () | |
Insert a new empty rule in the database. More... | |
insertRule ($firstName, $secondName, $firstType, $secondType, $comment, $result) | |
Insert new rule in the database. More... | |
updateRuleFromArray ($ruleArray) | |
Update the existing rules. More... | |
deleteRule ($rulePk) | |
Delete a license compatibility rule. More... | |
getDefaultCompatibility () | |
Private Member Functions | |
isRuleIdValid ($rulePk) | |
Check if rule ID exists in DB. More... | |
Private Attributes | |
$dbManager | |
$logger | |
$licenseDao | |
$agentDao | |
$defaultCompatibility | |
$agentName | |
Definition at line 21 of file CompatibilityDao.php.
Fossology\Lib\Dao\CompatibilityDao::deleteRule | ( | $rulePk | ) |
Delete a license compatibility rule.
int | $rulePk | ID of the rule to be deleted |
Definition at line 288 of file CompatibilityDao.php.
Fossology\Lib\Dao\CompatibilityDao::getAllRules | ( | $limit = 10 , |
|
$offset = 0 , |
|||
$searchTerm = '' |
|||
) |
Get all the existing license compatibility rules from the database.
int | $limit | The maximum number of rules to retrieve (default is 10) |
int | $offset | The number of rules to skip (default is 0) |
string | $searchTerm | The search term to filter rules by (default is an empty string) |
Definition at line 103 of file CompatibilityDao.php.
Fossology\Lib\Dao\CompatibilityDao::getDefaultCompatibility | ( | ) |
Get the default compatibility from the rules table.
Definition at line 312 of file CompatibilityDao.php.
Fossology\Lib\Dao\CompatibilityDao::getTotalRulesCount | ( | $searchTerm = '' | ) |
Get the total count of license compatibility rules.
string | $searchTerm | The search term to filter rules by (default is an empty string) |
Definition at line 120 of file CompatibilityDao.php.
Fossology\Lib\Dao\CompatibilityDao::insertEmptyRule | ( | ) |
Insert a new empty rule in the database.
Definition at line 134 of file CompatibilityDao.php.
Fossology\Lib\Dao\CompatibilityDao::insertRule | ( | $firstName, | |
$secondName, | |||
$firstType, | |||
$secondType, | |||
$comment, | |||
$result | |||
) |
Insert new rule in the database.
string | $firstName | First license |
string | $secondName | Second license |
string | $firstType | First license type |
string | $secondType | Second license type |
string | $comment | Comment on the rule |
string | $result | Compatibility result of the two licenses |
Definition at line 170 of file CompatibilityDao.php.
|
private |
Check if rule ID exists in DB.
int | $rulePk | Rule ID to check. |
Definition at line 268 of file CompatibilityDao.php.
Fossology\Lib\Dao\CompatibilityDao::updateRuleFromArray | ( | $ruleArray | ) |
Update the existing rules.
array | $ruleArray | Contains the id of the licenses |
Definition at line 208 of file CompatibilityDao.php.