diff options
author | zottel <github@zottel.net> | 2015-09-23 08:59:28 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2015-09-23 08:59:28 +0200 |
commit | 0bfdb45b414b477573b6389e7730d8f93f53993e (patch) | |
tree | 114c0dc95c4cf3baa514de13ca2ed0c1759dd388 /include/DReport.php | |
parent | 032ef0ca3495cf4a1caaf1a6ea8000c17aba0ba5 (diff) | |
parent | f506f73d3fc80fb68f63f654b5e93a6920780d6f (diff) | |
download | volse-hubzilla-0bfdb45b414b477573b6389e7730d8f93f53993e.tar.gz volse-hubzilla-0bfdb45b414b477573b6389e7730d8f93f53993e.tar.bz2 volse-hubzilla-0bfdb45b414b477573b6389e7730d8f93f53993e.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/DReport.php')
-rw-r--r-- | include/DReport.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/DReport.php b/include/DReport.php new file mode 100644 index 000000000..ef86c8cbc --- /dev/null +++ b/include/DReport.php @@ -0,0 +1,55 @@ +<?php + + +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 + ); + } +} |