12 namespace Fossology\UI\Api\Models;
27 private $scanCopyright;
45 public function __construct($scanLicense =
false, $scanCopyright =
false, $scanEmail =
false, $scanUrl =
false)
47 $this->scanLicense = $scanLicense;
48 $this->scanCopyright = $scanCopyright;
49 $this->scanEmail = $scanEmail;
50 $this->scanUrl = $scanUrl;
60 if (array_key_exists(
"license", $scancodeArray)) {
61 $this->scanLicense = filter_var($scancodeArray[
"license"],
62 FILTER_VALIDATE_BOOLEAN);
64 if (array_key_exists(
"copyright", $scancodeArray)) {
65 $this->scanCopyright = filter_var($scancodeArray[
"copyright"],
66 FILTER_VALIDATE_BOOLEAN);
68 if (array_key_exists(
"email", $scancodeArray)) {
69 $this->scanEmail = filter_var($scancodeArray[
"email"],
70 FILTER_VALIDATE_BOOLEAN);
72 if (array_key_exists(
"url", $scancodeArray)) {
73 $this->scanUrl = filter_var($scancodeArray[
"url"],
74 FILTER_VALIDATE_BOOLEAN);
85 return $this->scanLicense;
93 return $this->scanCopyright;
101 return $this->scanEmail;
109 return $this->scanUrl;
118 $this->scanLicense = filter_var($scanLicense, FILTER_VALIDATE_BOOLEAN);
126 $this->scanCopyright = filter_var($scanCopyright, FILTER_VALIDATE_BOOLEAN);
134 $this->scanEmail = filter_var($scanEmail, FILTER_VALIDATE_BOOLEAN);
142 $this->scanUrl = filter_var($scanUrl, FILTER_VALIDATE_BOOLEAN);
152 "license" => $this->scanLicense,
153 "copyright" => $this->scanCopyright,
154 "email" => $this->scanEmail,
155 "url" => $this->scanUrl
setScanLicense($scanLicense)
setScanCopyright($scanCopyright)
__construct($scanLicense=false, $scanCopyright=false, $scanEmail=false, $scanUrl=false)
setUsingArray($scancodeArray)