-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathTicketEntity.php
More file actions
46 lines (38 loc) · 991 Bytes
/
TicketEntity.php
File metadata and controls
46 lines (38 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
class TicketEntity
{
protected $id;
protected $title;
protected $description;
protected $component;
/**
* Accept an array of data matching properties of this class
* and create the class
*
* @param array $data The data to use to create
*/
public function __construct(array $data) {
// no id if we're creating
if(isset($data['id'])) {
$this->id = $data['id'];
}
$this->title = $data['title'];
$this->description = $data['description'];
$this->component = $data['component'];
}
public function getId() {
return $this->id;
}
public function getTitle() {
return $this->title;
}
public function getDescription() {
return $this->description;
}
public function getShortDescription() {
return substr($this->description, 0, 20);
}
public function getComponent() {
return $this->component;
}
}