14 namespace Fossology\UI\Api\Models;
116 if (array_key_exists(
"bucket", $analysisArray)) {
117 $this->bucket = filter_var($analysisArray[
"bucket"],
118 FILTER_VALIDATE_BOOLEAN);
120 if (array_key_exists(($version == ApiVersion::V2?
"copyrightEmailAuthor" :
"copyright_email_author"), $analysisArray)) {
121 $this->copyright = filter_var($analysisArray[$version == ApiVersion::V2?
"copyrightEmailAuthor" :
"copyright_email_author"],
122 FILTER_VALIDATE_BOOLEAN);
124 if (array_key_exists(
"ecc", $analysisArray)) {
125 $this->ecc = filter_var($analysisArray[
"ecc"], FILTER_VALIDATE_BOOLEAN);
127 if (array_key_exists(
"keyword", $analysisArray)) {
128 $this->keyword = filter_var($analysisArray[
"keyword"],
129 FILTER_VALIDATE_BOOLEAN);
131 if (array_key_exists(
"mime", $analysisArray)) {
132 $this->mimetype = filter_var($analysisArray[
"mime"],
133 FILTER_VALIDATE_BOOLEAN);
135 if (array_key_exists(
"monk", $analysisArray)) {
136 $this->monk = filter_var($analysisArray[
"monk"], FILTER_VALIDATE_BOOLEAN);
138 if (array_key_exists(
"nomos", $analysisArray)) {
139 $this->nomos = filter_var($analysisArray[
"nomos"], FILTER_VALIDATE_BOOLEAN);
141 if (array_key_exists(
"ojo", $analysisArray)) {
142 $this->ojo = filter_var($analysisArray[
"ojo"], FILTER_VALIDATE_BOOLEAN);
144 if (array_key_exists(
"reso", $analysisArray)) {
145 $this->reso = filter_var($analysisArray[
"reso"], FILTER_VALIDATE_BOOLEAN);
147 if (array_key_exists(
"package", $analysisArray)) {
148 $this->pkgagent = filter_var($analysisArray[
"package"],
149 FILTER_VALIDATE_BOOLEAN);
151 if (array_key_exists(
"compatibility", $analysisArray)) {
152 $this->compatibility = filter_var($analysisArray[
"compatibility"],
153 FILTER_VALIDATE_BOOLEAN);
165 if (stristr($analysisString,
"bucket")) {
166 $this->bucket =
true;
168 if (stristr($analysisString,
"copyright")) {
169 $this->copyright =
true;
171 if (stristr($analysisString,
"ecc")) {
174 if (stristr($analysisString,
"keyword")) {
175 $this->keyword =
true;
177 if (stristr($analysisString,
"mimetype")) {
178 $this->mimetype =
true;
180 if (stristr($analysisString,
"monk")) {
183 if (stristr($analysisString,
"nomos")) {
186 if (stristr($analysisString,
"ojo")) {
189 if (stristr($analysisString,
"reso")) {
192 if (stristr($analysisString,
"pkgagent")) {
193 $this->pkgagent =
true;
195 if (stristr($analysisString,
"compatibility")) {
196 $this->compatibility =
true;
296 $this->bucket = filter_var(
$bucket, FILTER_VALIDATE_BOOLEAN);
304 $this->copyright = filter_var(
$copyright, FILTER_VALIDATE_BOOLEAN);
312 $this->ecc = filter_var(
$ecc, FILTER_VALIDATE_BOOLEAN);
320 $this->keyword = filter_var(
$keyword, FILTER_VALIDATE_BOOLEAN);
328 $this->mimetype = filter_var($mime, FILTER_VALIDATE_BOOLEAN);
336 $this->monk = filter_var(
$monk, FILTER_VALIDATE_BOOLEAN);
344 $this->nomos = filter_var(
$nomos, FILTER_VALIDATE_BOOLEAN);
352 $this->ojo = filter_var(
$ojo, FILTER_VALIDATE_BOOLEAN);
360 $this->reso = filter_var($reso, FILTER_VALIDATE_BOOLEAN);
368 $this->pkgagent = filter_var($package, FILTER_VALIDATE_BOOLEAN);
376 $this->compatibility = filter_var(
$compatibility, FILTER_VALIDATE_BOOLEAN);
383 public function getArray($version = ApiVersion::V1)
385 if ($version == ApiVersion::V2) {
395 "reso" => $this->reso,
409 "reso" => $this->reso,
Model to hold analysis settings.
setCompatibility($compatibility)
getArray($version=ApiVersion::V1)
setUsingArray($analysisArray, $version=ApiVersion::V1)
__construct($bucket=false, $copyright=false, $ecc=false, $keyword=false, $mimetype=false, $monk=false, $nomos=false, $ojo=false, $reso=false, $pkgagent=false, $compatibility=false)
setUsingString($analysisString)