aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/DReport.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
committerMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
commit4baf5eab16d809977a44e7911ddcab0ff8383897 (patch)
tree393f618c4cfc20f53264ecd8a26a08de0823d35d /Zotlabs/Lib/DReport.php
parent577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff)
parent7361af85b5488fc8bd1744389a3a332dc74276b0 (diff)
downloadvolse-hubzilla-3.2.tar.gz
volse-hubzilla-3.2.tar.bz2
volse-hubzilla-3.2.zip
Merge branch '3.2RC'3.2
Diffstat (limited to 'Zotlabs/Lib/DReport.php')
-rw-r--r--Zotlabs/Lib/DReport.php55
1 files changed, 55 insertions, 0 deletions
diff --git a/Zotlabs/Lib/DReport.php b/Zotlabs/Lib/DReport.php
new file mode 100644
index 000000000..a68d6c18f
--- /dev/null
+++ b/Zotlabs/Lib/DReport.php
@@ -0,0 +1,55 @@
+<?php
+namespace Zotlabs\Lib;
+
+class DReport {
+
+ private $location;
+ private $sender;
+ private $recipient;
+ private $message_id;
+ private $status;
+ private $date;
+
+ function __construct($location,$sender,$recipient,$message_id,$status = 'deliver') {
+ $this->location = $location;
+ $this->sender = $sender;
+ $this->recipient = $recipient;
+ $this->message_id = $message_id;
+ $this->status = $status;
+ $this->date = datetime_convert();
+ }
+
+ function update($status) {
+ $this->status = $status;
+ $this->date = datetime_convert();
+ }
+
+ function addto_recipient($name) {
+ $this->recipient = $this->recipient . ' ' . $name;
+ }
+
+ function addto_update($status) {
+ $this->status = $this->status . ' ' . $status;
+ }
+
+
+ function set($arr) {
+ $this->location = $arr['location'];
+ $this->sender = $arr['sender'];
+ $this->recipient = $arr['recipient'];
+ $this->message_id = $arr['message_id'];
+ $this->status = $arr['status'];
+ $this->date = $arr['date'];
+ }
+
+ function get() {
+ return array(
+ 'location' => $this->location,
+ 'sender' => $this->sender,
+ 'recipient' => $this->recipient,
+ 'message_id' => $this->message_id,
+ 'status' => $this->status,
+ 'date' => $this->date
+ );
+ }
+}