Completed
Push — master ( 5f0535...74f4b9 )
by Jean-Christophe
01:50
created

CRUDMessage::setTimeout()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Ubiquity\controllers\crud;
4
5
class CRUDMessage {
6
	private $message;
7
	private $type;
8
	private $icon;
9
	private $title;
10
	private $timeout;
11
	private $_message;
12
	
13
	public function __construct($message,$title="",$type="",$icon="",$timeout=null){
14
		$this->message=$message;
15
		$this->title=$title;
16
		$this->type=$type;
17
		$this->icon=$icon;
18
		$this->timeout=$timeout;
19
		$this->_message=$message;
20
	}
21
	
22
	/**
23
	 * @return string
24
	 */
25
	public function getMessage() {
26
		return $this->_message;
27
	}
28
29
	/**
30
	 * @return string
31
	 */
32
	public function getType() {
33
		return $this->type;
34
	}
35
36
	/**
37
	 * @return mixed
38
	 */
39
	public function getIcon() {
40
		return $this->icon;
41
	}
42
43
	/**
44
	 * @return string
45
	 */
46
	public function getTitle() {
47
		return $this->title;
48
	}
49
50
	/**
51
	 * @param string $message
52
	 */
53
	public function setMessage($message) {
54
		$this->message = $message;
55
	}
56
57
	/**
58
	 * @param string $type
59
	 * @return $this
60
	 */
61
	public function setType($type) {
62
		$this->type = $type;
63
		return $this;
64
	}
65
66
	/**
67
	 * @param string $icon
68
	 * @return $this
69
	 */
70
	public function setIcon($icon) {
71
		$this->icon = $icon;
72
		return $this;
73
	}
74
75
	/**
76
	 * @param string $title
77
	 * @return $this
78
	 */
79
	public function setTitle($title) {
80
		$this->title = $title;
81
		return $this;
82
	}
83
	
84
	/**
85
	 * @return integer
86
	 */
87
	public function getTimeout() {
88
		return $this->timeout;
89
	}
90
91
	/**
92
	 * @param integer $timeout
93
	 * @return $this
94
	 */
95
	public function setTimeout($timeout) {
96
		$this->timeout = $timeout;
97
		return $this;
98
	}
99
	/**
100
	 * 
101
	 * @param string $value
102
	 * @return $this
103
	 */
104
	public function parse($value){
105
		$this->_message=str_replace("{value}", $value, $this->message);
106
		return $this;
107
	}
108
109
}
110
111