FOSSology  4.4.0
Open Source License Compliance by Open Source Software
SearchResult.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2017 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
12 namespace Fossology\UI\Api\Models;
13 
19 {
24  private $upload;
29  private $uploadTreeId;
34  private $filename;
35 
43  {
44  $this->upload = $upload;
45  $this->uploadTreeId = intval($uploadTreeId);
46  $this->filename = $filename;
47  }
48 
53  public function getJSON()
54  {
55  return json_encode($this->getArray());
56  }
57 
62  public function getArray()
63  {
64  return [
65  'upload' => $this->upload,
66  'uploadTreeId' => $this->uploadTreeId,
67  'filename' => $this->filename
68  ];
69  }
70 }
Model to hold search results.
__construct($upload, $uploadTreeId, $filename)