FOSSology  4.4.0
Open Source License Compliance by Open Source Software
UploadProgress.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2015 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
8 namespace Fossology\Lib\Data\Upload;
9 
11 
12 class UploadProgress extends Upload
13 {
15  protected $groupId;
17  protected $assignee;
19  protected $status;
21  protected $comment;
22 
27  public static function createFromTable($row)
28  {
29  return new UploadProgress(intval($row['upload_pk']), $row['upload_filename'],
30  $row['upload_desc'], $row['uploadtree_tablename'],
31  strtotime($row['upload_ts']), intval($row['group_fk']),
32  intval($row['assignee']), intval($row['status_fk']),
33  $row['status_comment']);
34  }
35 
43  public function __construct($id, $filename, $description, $treeTableName, $timestamp, $groupId, $assignee, $status, $comment)
44  {
45  $this->groupId = $groupId;
46  $this->assignee = $assignee;
47  $this->status = $status;
48  $this->commen = $comment;
49 
50  parent::__construct($id, $filename, $description, $treeTableName, $timestamp);
51  }
52 
56  public function getGroupId()
57  {
58  return $this->groupId;
59  }
60 
64  public function getAssignee()
65  {
66  return $this->assignee;
67  }
68 
72  public function getStatusId()
73  {
74  return $this->status;
75  }
76 
80  public function getStatusString()
81  {
82  $status = new UploadStatus();
83  return $status->getTypeName($this->status);
84  }
85 
89  public function getComment()
90  {
91  return $this->comment;
92  }
93 }
__construct($id, $filename, $description, $treeTableName, $timestamp, $groupId, $assignee, $status, $comment)