Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Email
DelayedQueue
DatabaseRecord.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Email\DelayedQueue
;
4
5
use
Elgg\Notifications\Notification
;
6
19
class
DatabaseRecord
{
20
24
protected
$row
;
25
31
public
function
__construct
(\stdClass
$row
) {
32
$this->row =
$row
;
33
}
34
42
public
function
__get
(
$name
) {
43
44
switch
(
$name
) {
45
case
'id'
:
46
case
'recipient_guid'
:
47
case
'timestamp'
:
48
return
(
int
) $this->row->$name;
49
50
case
'delivery_interval'
:
51
return
$this->row->$name;
52
53
case
'data'
:
54
return
unserialize($this->row->data);
55
}
56
57
return
null;
58
}
59
65
public
function
delete
():
bool
{
66
return
(
bool
)
_elgg_services
()->delayedEmailQueueTable->deleteRow($this->
id
);
67
}
68
74
public
function
getNotification
(): ?
Notification
{
75
return
$this->data instanceof
Notification
? $this->data : null;
76
}
77
}
Elgg\Email\DelayedQueue\DatabaseRecord
Definition:
DatabaseRecord.php:19
$name
if(!$user||!$user->canDelete()) $name
Definition:
delete.php:22
Elgg\Email\DelayedQueue\DatabaseRecord\__get
__get($name)
Get a row property.
Definition:
DatabaseRecord.php:42
Elgg\Notifications\Notification
Notification container.
Definition:
Notification.php:11
Notification
Elgg\Email\DelayedQueue
Definition:
CronHandler.php:3
Elgg\Email\DelayedQueue\DatabaseRecord\getNotification
getNotification()
Get the notification for this record.
Definition:
DatabaseRecord.php:74
Elgg\Email\DelayedQueue\DatabaseRecord\__construct
__construct(\stdClass $row)
Create a new record.
Definition:
DatabaseRecord.php:31
_elgg_services
_elgg_services()
Get the global service provider.
Definition:
elgglib.php:351
Elgg\Email\DelayedQueue\DatabaseRecord\$row
$row
Definition:
DatabaseRecord.php:24
Generated on Sat Dec 21 2024 00:02:51 for Elgg by
1.8.11