Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
CRUDMessage.php
Go to the documentation of this file.
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
25
public
function
getMessage
(): string {
26
return $this->_message;
27
}
28
32
public
function
getType
(): string {
33
return $this->type;
34
}
35
39
public
function
getIcon
(): string {
40
return $this->icon;
41
}
42
46
public
function
getTitle
(): string {
47
return $this->title;
48
}
49
54
public
function
setMessage
(
string
$message):
CRUDMessage
{
55
$this->_message = $message;
56
$this->message=$message;
57
return
$this;
58
}
59
64
public
function
setType
(
string
$type):
CRUDMessage
{
65
$this->type = $type;
66
return
$this;
67
}
68
73
public
function
setIcon
(
string
$icon):
CRUDMessage
{
74
$this->icon = $icon;
75
return
$this;
76
}
77
82
public
function
setTitle
(
string
$title):
CRUDMessage
{
83
$this->title = $title;
84
return
$this;
85
}
86
90
public
function
getTimeout
(): ?int {
91
return $this->timeout;
92
}
93
98
public
function
setTimeout
(
int
$timeout):
CRUDMessage
{
99
$this->timeout = $timeout;
100
return
$this;
101
}
102
108
public
function
parse
(
string
$value):
CRUDMessage
{
109
$this->_message=\str_replace(
"{value}"
, $value, $this->message);
110
return
$this;
111
}
112
117
public
function
parseContent
(array $keyValues):
CRUDMessage
{
118
$msg=$this->_message;
119
foreach
($keyValues as $key=>$value){
120
$msg=str_replace(
"{"
.$key.
"}"
, $value, $msg);
121
}
122
$this->_message=$msg;
123
return
$this;
124
}
125
126
}
127
Ubiquity\controllers\crud\CRUDMessage
Definition
CRUDMessage.php:5
Ubiquity\controllers\crud\CRUDMessage\getMessage
getMessage()
Definition
CRUDMessage.php:25
Ubiquity\controllers\crud\CRUDMessage\getIcon
getIcon()
Definition
CRUDMessage.php:39
Ubiquity\controllers\crud\CRUDMessage\__construct
__construct($message, $title="", $type="", $icon="", $timeout=null)
Definition
CRUDMessage.php:13
Ubiquity\controllers\crud\CRUDMessage\setTimeout
setTimeout(int $timeout)
Definition
CRUDMessage.php:98
Ubiquity\controllers\crud\CRUDMessage\$_message
$_message
Definition
CRUDMessage.php:11
Ubiquity\controllers\crud\CRUDMessage\setTitle
setTitle(string $title)
Definition
CRUDMessage.php:82
Ubiquity\controllers\crud\CRUDMessage\getType
getType()
Definition
CRUDMessage.php:32
Ubiquity\controllers\crud\CRUDMessage\$timeout
$timeout
Definition
CRUDMessage.php:10
Ubiquity\controllers\crud\CRUDMessage\getTitle
getTitle()
Definition
CRUDMessage.php:46
Ubiquity\controllers\crud\CRUDMessage\$type
$type
Definition
CRUDMessage.php:7
Ubiquity\controllers\crud\CRUDMessage\setIcon
setIcon(string $icon)
Definition
CRUDMessage.php:73
Ubiquity\controllers\crud\CRUDMessage\getTimeout
getTimeout()
Definition
CRUDMessage.php:90
Ubiquity\controllers\crud\CRUDMessage\$message
$message
Definition
CRUDMessage.php:6
Ubiquity\controllers\crud\CRUDMessage\$icon
$icon
Definition
CRUDMessage.php:8
Ubiquity\controllers\crud\CRUDMessage\setMessage
setMessage(string $message)
Definition
CRUDMessage.php:54
Ubiquity\controllers\crud\CRUDMessage\$title
$title
Definition
CRUDMessage.php:9
Ubiquity\controllers\crud\CRUDMessage\parse
parse(string $value)
Definition
CRUDMessage.php:108
Ubiquity\controllers\crud\CRUDMessage\parseContent
parseContent(array $keyValues)
Definition
CRUDMessage.php:117
Ubiquity\controllers\crud\CRUDMessage\setType
setType(string $type)
Definition
CRUDMessage.php:64
Ubiquity\controllers\crud
Definition
CRUDController.php:3
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
controllers
crud
CRUDMessage.php
Generated on Sun Dec 10 2023 15:04:17 for
Ubiquity
by
doxygen
1.9.8