FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Upload.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2014-2015 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
8 namespace Fossology\Lib\Data\Upload;
9 
10 class Upload
11 {
13  protected $id;
15  protected $filename;
17  protected $description;
19  protected $treeTableName;
21  protected $timestamp;
22 
27  public static function createFromTable($row)
28  {
29  return new Upload(intval($row['upload_pk']), $row['upload_filename'],
30  $row['upload_desc'], $row['uploadtree_tablename'],
31  strtotime($row['upload_ts']));
32  }
33 
41  public function __construct($id, $filename, $description, $treeTableName, $timestamp)
42  {
43  $this->id = $id;
44  $this->filename = $filename;
45  $this->description = $description;
46  $this->treeTableName = $treeTableName;
47  $this->timestamp = $timestamp;
48  }
49 
53  public function getDescription()
54  {
55  return $this->description;
56  }
57 
61  public function getFilename()
62  {
63  return $this->filename;
64  }
65 
69  public function getId()
70  {
71  return $this->id;
72  }
73 
77  public function getTreeTableName()
78  {
79  return $this->treeTableName;
80  }
81 
85  public function getTimestamp()
86  {
87  return $this->timestamp;
88  }
89 }
__construct($id, $filename, $description, $treeTableName, $timestamp)
Definition: Upload.php:41