12 namespace Fossology\UI\Api\Models;
25 const NOT_FOUND =
"Not found";
30 const INVALID =
"Invalid keys";
60 $this->findings =
null;
61 $this->uploads =
null;
79 if ($this->message == self::NOT_FOUND || $this->message == self::INVALID) {
90 if (count($this->uploads) == 1 && $this->uploads[0] == 0) {
128 if ($this->uploads ===
null) {
129 $this->uploads = array();
131 $this->uploads[] = intval(
$uploads);
152 $returnArray[
'hash'] = $this->hash->getArray();
153 if ($this->message != self::NOT_FOUND && $this->message != self::INVALID) {
154 $returnArray[
'findings'] = $this->
getFindings()->getArray();
155 $returnArray[
'uploads'] = $this->
getUploads();
157 $returnArray[
'message'] = $this->
getMessage();
172 foreach ($inputList as $fileJson) {
174 if (
$hash ===
null) {
177 $file->setMessage(self::INVALID);
File model holding information about a single file.
static parseFromArray($inputList)
Hash model holding information about file like checksums and size.
static createFromArray($inputArray)