24 private static $keys = array(
25 'addConcludedAsDecisions',
26 'addLicenseInfoFromInfoInFile',
27 'addLicenseInfoFromConcluded',
28 'addConcludedAsDecisionsOverwrite',
30 'addConcludedAsDecisionsTBD',
34 protected $createLicensesAsCandidate =
true;
35 protected $createLicensesInfosAsFindings =
true;
36 protected $createConcludedLicensesAsFindings =
false;
37 protected $createConcludedLicensesAsConclusions =
true;
38 protected $overwriteDecisions =
false;
39 protected $addCopyrightInformation =
false;
40 protected $concludeLicenseDecisionType = DecisionTypes::IDENTIFIED;
42 private function getFromArgs($args, $num, $expected=
"true")
44 return array_key_exists(self::$keys[$num],$args) ? $args[self::$keys[$num]] === $expected :
false;
47 function __construct($args)
49 $this->createConcludedLicensesAsConclusions = $this->getFromArgs($args,0);
50 $this->createLicensesInfosAsFindings = $this->getFromArgs($args,1);
51 $this->createConcludedLicensesAsFindings = $this->getFromArgs($args,2);
52 $this->overwriteDecisions = $this->getFromArgs($args,3);
53 $this->addCopyrightInformation = $this->getFromArgs($args,4);
55 $addConcludedAsDecisionsTBD = $this->getFromArgs($args,5);
56 if($addConcludedAsDecisionsTBD)
58 $this->concludeLicenseDecisionType = DecisionTypes::TO_BE_DISCUSSED;
61 $this->createLicensesAsCandidate = $this->getFromArgs($args, 6,
"candidate");
63 $this->echoConfiguration();
66 private function var_dump($mixed = null) {
69 $dump = ob_get_contents();
74 public function echoConfiguration()
76 echo
"INFO: \$createLicensesAsCandidate is: " .$this->var_dump($this->createLicensesAsCandidate);
77 echo
"\nINFO: \$createLicensesInfosAsFindings is: " .$this->var_dump($this->createLicensesInfosAsFindings);
78 echo
"\nINFO: \$createConcludedLicensesAsFindings is: " .$this->var_dump($this->createConcludedLicensesAsFindings);
79 echo
"\nINFO: \$createConcludedLicensesAsConclusions is: ".$this->var_dump($this->createConcludedLicensesAsConclusions);
80 echo
"\nINFO: \$overwriteDecisions is: " .$this->var_dump($this->overwriteDecisions);
81 echo
"\nINFO: \$addCopyrightInformation is: " .$this->var_dump($this->addCopyrightInformation);
82 echo
"\nINFO: \$concludeLicenseDecisionType is: " .$this->var_dump($this->concludeLicenseDecisionType);
91 return $this->createLicensesAsCandidate;
99 return $this->createLicensesInfosAsFindings;
107 return $this->createConcludedLicensesAsFindings;
115 return $this->createConcludedLicensesAsConclusions;
123 return $this->concludeLicenseDecisionType;
132 $this->createConcludedLicensesAsConclusions = $createConcludedLicensesAsConclusions;
141 return $this->overwriteDecisions;
149 return $this->addCopyrightInformation;
isCreateLicensesInfosAsFindings()
isAddCopyrightInformation()
getConcludeLicenseDecisionType()
isCreateConcludedLicensesAsConclusions()
isCreateConcludedLicensesAsFindings()
setCreateConcludedLicensesAsConclusions($createConcludedLicensesAsConclusions)
isCreateLicensesAsCandidate()