FOSSology  4.4.0
Open Source License Compliance by Open Source Software
SpdxTwoAgentPlugin.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2015 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
11 namespace Fossology\SpdxTwo\UI;
12 
14 
20 {
21  public function __construct()
22  {
23  $this->Name = "agent_spdx2";
24  $this->Title = _("SPDX2 generation");
25  $this->AgentName = "spdx2";
26 
27  parent::__construct();
28  }
29 
34  function preInstall()
35  {
36  // no AgentCheckBox
37  }
38 
44  public function uploadsAdd($uploads)
45  {
46  if (count($uploads) == 0) {
47  return '';
48  }
49  return '--uploadsAdd='. implode(',', array_keys($uploads));
50  }
51 }
52 
53 register_plugin(new SpdxTwoAgentPlugin());
Generate SPDX2 report for multiple uploads.
uploadsAdd($uploads)
Add uploads to report.