FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
LicenseRef.php
1 <?php
2 /*
3 Copyright (C) 2014, Siemens AG
4 Author: Johannes Najjar
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 version 2 as published by the Free Software Foundation.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 namespace Fossology\Lib\Data;
21 
23 {
25  private $id;
26 
28  private $shortName;
29 
31  private $fullName;
32 
38  function __construct($licenseId, $licenseShortName, $licenseName)
39  {
40  $this->id = $licenseId;
41  $this->shortName = $licenseShortName;
42  $this->fullName = $licenseName ? : $licenseShortName;
43  }
44 
48  public function getId()
49  {
50  return $this->id;
51  }
52 
56  public function getFullName()
57  {
58  return $this->fullName;
59  }
60 
64  public function getShortName()
65  {
66  return $this->shortName;
67  }
68 
69  public function __toString()
70  {
71  return 'LicenseRef('
72  .$this->id
73  .", ".$this->shortName
74  .", ".$this->fullName
75  .')';
76  }
77 }
__construct($licenseId, $licenseShortName, $licenseName)
Definition: LicenseRef.php:38