FOSSology  4.4.0
Open Source License Compliance by Open Source Software
agent-shagent.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2019 Sandip Kumar Bhuyan <sandipbhuyan@gmail.com>
4  Author: Sandip Kumar Bhuyan<sandipbhyan@gmail.com>
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
9 
15 {
17  private $shAgentDesc = "Checks if the current file (or files in an upload) has been published in Software Heritage or if it is genuinely part of the distribution.";
18 
19  public function __construct()
20  {
21  $this->Name = "agent_shagent";
22  $this->Title = ("Software Heritage Analysis <img src=\"images/info_16.png\" data-toggle=\"tooltip\" title=\"".$this->shAgentDesc."\" class=\"info-bullet\"/>");
23  $this->AgentName = "softwareHeritage";
24 
25  parent::__construct();
26  }
27 
32  function AgentHasResults($uploadId=0)
33  {
34  return CheckARS($uploadId, $this->AgentName, "Software Heritage scanner", "softwareHeritage");
35  }
36 }
37 
38 register_plugin(new softwareHeritageAgentPlugin());
CheckARS($upload_pk, $AgentName, $AgentDesc, $AgentARSTableName)
Check the ARS table to see if an agent has successfully scanned an upload.