FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Decider.php
Go to the documentation of this file.
1 <?php
25 namespace Fossology\UI\Api\Models;
26 
31 class Decider
32 {
37  private $nomosMonk;
42  private $bulkReused;
48  private $newScanner;
53  private $ojoDecider;
54 
63  public function __construct($nomosMonk = false, $bulkReused = false, $newScanner = false, $ojoDecider = false)
64  {
65  $this->nomosMonk = $nomosMonk;
66  $this->bulkReused = $bulkReused;
67  $this->newScanner = $newScanner;
68  $this->ojoDecider = $ojoDecider;
69  }
70 
76  public function setUsingArray($deciderArray)
77  {
78  if (array_key_exists("nomos_monk", $deciderArray)) {
79  $this->nomosMonk = filter_var($deciderArray["nomos_monk"],
80  FILTER_VALIDATE_BOOLEAN);
81  }
82  if (array_key_exists("bulk_reused", $deciderArray)) {
83  $this->bulkReused = filter_var($deciderArray["bulk_reused"],
84  FILTER_VALIDATE_BOOLEAN);
85  }
86  if (array_key_exists("new_scanner", $deciderArray)) {
87  $this->newScanner = filter_var($deciderArray["new_scanner"],
88  FILTER_VALIDATE_BOOLEAN);
89  }
90  if (array_key_exists("ojo_decider", $deciderArray)) {
91  $this->ojoDecider = filter_var($deciderArray["ojo_decider"],
92  FILTER_VALIDATE_BOOLEAN);
93  }
94  return $this;
95  }
96 
98 
101  public function getNomosMonk()
102  {
103  return $this->nomosMonk;
104  }
105 
109  public function getBulkReused()
110  {
111  return $this->bulkReused;
112  }
113 
117  public function getNewScanner()
118  {
119  return $this->newScanner;
120  }
121 
125  public function getOjoDecider()
126  {
127  return $this->ojoDecider;
128  }
129 
131 
134  public function setNomosMonk($nomosMonk)
135  {
136  $this->nomosMonk = filter_var($nomosMonk, FILTER_VALIDATE_BOOLEAN);
137  }
138 
142  public function setBulkReused($bulkReused)
143  {
144  $this->bulkReused = filter_var($bulkReused, FILTER_VALIDATE_BOOLEAN);
145  }
146 
150  public function setNewScanner($newScanner)
151  {
152  $this->newScanner = filter_var($newScanner, FILTER_VALIDATE_BOOLEAN);
153  }
154 
158  public function setOjoDecider($ojoDecider)
159  {
160  $this->ojoDecider = filter_var($ojoDecider, FILTER_VALIDATE_BOOLEAN);
161  }
162 
167  public function getArray()
168  {
169  return [
170  "nomos_monk" => $this->nomosMonk,
171  "bulk_reused" => $this->bulkReused,
172  "new_scanner" => $this->newScanner,
173  "ojo_decider" => $this->ojoDecider
174  ];
175  }
176 }
setUsingArray($deciderArray)
Definition: Decider.php:76
__construct($nomosMonk=false, $bulkReused=false, $newScanner=false, $ojoDecider=false)
Definition: Decider.php:63