48 $sql =
"SELECT lrm.rf_shortname AS firstname, lrs.rf_shortname AS secondname,
49 first_type AS firsttype, second_type AS secondtype,
50 CASE compatibility WHEN 't' THEN 'true' ELSE 'false' END AS compatibility,
53 LEFT JOIN license_ref lrm ON lrm.rf_pk = r.first_rf_fk
54 LEFT JOIN license_ref lrs ON lrs.rf_pk = r.second_rf_fk";
57 $stmt = __METHOD__ .
'.lr';
59 $sql .=
' WHERE lr_pk = $'.count($param);
60 $row = $this->
dbManager->getSingleRow($sql, $param, $stmt);
64 $sql .=
' ORDER BY lr_pk';
65 $vars = $this->
dbManager->getRows($sql, $param, $stmt);
68 $rules[
"default"] = $this->compatibilityDao->getDefaultCompatibility();
69 $rules[
"rules"] = $vars;
70 return yaml_emit($rules);
Helper class to export license list as a YAML from the DB.
createYaml($lr=0)
Create the YAML from the DB.
__construct(DbManager $dbManager, CompatibilityDao $compatibilityDao)
fo_dbManager * dbManager
fo_dbManager object
Utility functions for specific applications.