FOSSology  4.4.0
Open Source License Compliance by Open Source Software
FileHelper.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2018, 2020 Siemens AG
4  Author: Gaurav Mishra <mishra.gaurav@siemens.com>
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
13 namespace Fossology\UI\Api\Helper;
14 
17 
23 {
28  private $pfileDao;
29 
35  public function __construct(PfileDao $pfileDao)
36  {
37  $this->pfileDao = $pfileDao;
38  }
39 
47  public function getPfile($hash)
48  {
49  return $this->pfileDao->getPfile($hash->getSha1(), $hash->getMd5(),
50  $hash->getSha256(), $hash->getSize());
51  }
52 
60  public function pfileScannerFindings($pfileId)
61  {
62  return $this->pfileDao->getScannerFindings($pfileId);
63  }
64 
73  public function pfileConclusions($groupId, $pfileId)
74  {
75  return $this->pfileDao->getConclusions($groupId, $pfileId);
76  }
77 
85  public function getPackageUpload($pfileId)
86  {
87  return $this->pfileDao->getUploadForPackage($pfileId);
88  }
89 
97  public function pfileCopyright($pfileId)
98  {
99  return $this->pfileDao->getCopyright($pfileId);
100  }
101 }
Handle file related queries.
Definition: FileHelper.php:23
pfileConclusions($groupId, $pfileId)
Definition: FileHelper.php:73
__construct(PfileDao $pfileDao)
Definition: FileHelper.php:35
Hash model holding information about file like checksums and size.
Definition: Hash.php:18
REST api helper classes.