MIOLO20
Toggle main menu visibility
Página principal
Estruturas de dados
Estruturas de dados
Hierarquia de classes
Campos de dados
Tudo
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Funções
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variáveis
$
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Ficheiros
Lista de ficheiros
Globais
Tudo
$
_
a
c
d
e
f
g
i
l
m
o
p
r
s
u
Funções
Variáveis
$
_
c
e
f
l
m
o
p
s
Exemplos
•
Tudo
Estruturas de dados
Namespaces
Ficheiros
Funções
Variáveis
Carregando...
Procurando...
Nenhuma entrada encontrada
mnotification.class
Ir para a documentação deste ficheiro.
1
<?php
2
3
class
MPushNotification
4
{
25
private
$options;
26
27
public
function
__construct
(
$title
, $content =
''
, $icon =
''
, $otherOptions = array())
28
{
29
$MIOLO
=
MIOLO::getInstance
();
30
31
$this->options[
'title'
] =
$title
;
32
$this->options[
'body'
] = $content;
33
$this->options[
'icon'
] = strlen($icon) > 0 ? $icon :
$MIOLO
->getUI()->getImageTheme(
$MIOLO
->getTheme()->id,
'logo.png'
);
34
}
27
public
function
__construct
(
$title
, $content =
''
, $icon =
''
, $otherOptions = array()) {
…
}
35
36
public
function
generate
()
37
{
38
$title
= $this->options[
'title'
];
39
unset($this->options[
'title'
]);
40
41
$options = array();
42
foreach
($this->options as $name => $value)
43
{
44
$options[] =
"$name: '{$value}'"
;
45
}
46
47
$optionsString = count($options) > 0 ?
'{'
. implode(
', '
, $options) .
'}'
:
''
;
48
$component =
"if (location.protocol == 'https:') Push.create(\"$title\", $optionsString);"
;
49
MIOLO::getInstance
()->page->addJsCode($component);
50
}
36
public
function
generate
() {
…
}
51
52
56
public
function
setRequireInteraction
($requireInteraction)
57
{
58
$this->options[
'requireInteraction'
] = $requireInteraction;
59
}
56
public
function
setRequireInteraction
($requireInteraction) {
…
}
60
64
public
function
setTimeout
($timeout)
65
{
66
$this->options[
'timeout'
] = $timeout;
67
}
64
public
function
setTimeout
($timeout) {
…
}
68
69
}
3
class
MPushNotification
{
…
};
70
71
?>
MIOLO\getInstance
static getInstance()
Definição
miolo.class:134
MPushNotification
Definição
mnotification.class:4
MPushNotification\setTimeout
setTimeout($timeout)
Definição
mnotification.class:64
MPushNotification\setRequireInteraction
setRequireInteraction($requireInteraction)
Definição
mnotification.class:56
MPushNotification\generate
generate()
Definição
mnotification.class:36
MPushNotification\__construct
__construct($title, $content='', $icon='', $otherOptions=array())
Definição
mnotification.class:27
$MIOLO
$MIOLO
Definição
mdatetimefield.class:25
$title
$title
Definição
base.php:3
classes
ui
controls
mnotification.class
Gerado por
1.10.0