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