FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Info.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2017 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
12 namespace Fossology\UI\Api\Models;
13 
18 class Info
19 {
24  private $code;
29  private $message;
34  private $type;
41  public function __construct($code, $message, $type)
42  {
43  $this->code = $code;
44  $this->message = $message;
45  $this->type = $type;
46  }
47 
49 
54  public function getJSON()
55  {
56  return json_encode($this->getArray());
57  }
58 
63  public function getArray()
64  {
65  return [
66  'code' => $this->code,
67  'message' => $this->message,
68  'type' => $this->type
69  ];
70  }
71 
75  public function getCode()
76  {
77  return $this->code;
78  }
79 
83  public function getMessage()
84  {
85  return $this->message;
86  }
87 
91  public function getType()
92  {
93  return $this->type;
94  }
95 }
Info model to contain general error and return values.
Definition: Info.php:19
__construct($code, $message, $type)
Definition: Info.php:41