11 namespace Fossology\UI\Api\Models;
68 $this->reuseReport =
false;
69 $this->reuseCopyright =
false;
71 throw new \UnexpectedValueException(
72 "reuse_upload should be integer", 400);
86 if (array_key_exists(
"reuse_upload", $reuserArray)) {
89 if (array_key_exists(
"reuse_group", $reuserArray)) {
90 $this->reuseGroup = $reuserArray[
"reuse_group"];
92 if (array_key_exists(
"reuse_main", $reuserArray)) {
95 if (array_key_exists(
"reuse_enhanced", $reuserArray)) {
98 if (array_key_exists(
"reuse_report", $reuserArray)) {
101 if (array_key_exists(
"reuse_copyright", $reuserArray)) {
104 if ($this->reuseUpload ===
null) {
105 throw new \UnexpectedValueException(
106 "reuse_upload should be integer", 400);
108 if ($this->reuseGroup ===
null) {
109 throw new \UnexpectedValueException(
110 "reuse_group should be a string", 400);
171 FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);
172 if ($this->reuseUpload ===
null) {
173 throw new \UnexpectedValueException(
"Reuse upload should be an integer!", 400);
183 if ($this->reuseGroup ===
null) {
184 throw new \UnexpectedValueException(
"Reuse group should be a string!", 400);
194 FILTER_VALIDATE_BOOLEAN);
203 FILTER_VALIDATE_BOOLEAN);
212 FILTER_VALIDATE_BOOLEAN);
221 FILTER_VALIDATE_BOOLEAN);
Model to hold info required by Reuser agent.
setReuseReport($reuseReport)
setReuseUpload($reuseUpload)
__construct($reuseUpload, $reuseGroup, $reuseMain=false, $reuseEnhanced=false)
setUsingArray($reuserArray)
setReuseCopyright($reuseCopyright)
setReuseGroup($reuseGroup)
setReuseEnhanced($reuseEnhanced)