1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
14:
15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
16:
17: 18: 19: 20: 21: 22:
23: class cApiMailLogSuccessCollection extends ItemCollection {
24:
25: 26: 27:
28: public function __construct() {
29: global $cfg;
30: parent::__construct($cfg['tab']['mail_log_success'], 'idmailsuccess');
31: $this->_setItemClass('cApiMailLogSuccess');
32:
33:
34: $this->_setJoinPartner('cApiMailLogCollection');
35: }
36:
37: 38: 39: 40: 41: 42: 43: 44:
45: public function create($idmail, $recipient, $success, $exception) {
46: $item = $this->createNewItem();
47:
48: $item->set('idmail', $idmail);
49: $item->set('recipient', json_encode($recipient));
50: $item->set('success', $success);
51: $item->set('exception', $exception);
52:
53: $item->store();
54:
55: return $item;
56: }
57: }
58:
59: 60: 61: 62: 63: 64:
65: class cApiMailLogSuccess extends Item {
66:
67: 68: 69: 70: 71:
72: public function __construct($mId = false) {
73: global $cfg;
74: parent::__construct($cfg['tab']['mail_log_success'], 'idmailsuccess');
75: $this->setFilters(array(), array());
76: if ($mId !== false) {
77: $this->loadByPrimaryKey($mId);
78: }
79: }
80: }
81: