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: public function create($idmail, $recipient, $success, $exception) {
47: $item = $this->createNewItem();
48:
49: $item->set('idmail', $idmail);
50: $item->set('recipient', json_encode($recipient));
51: $item->set('success', $success);
52: $item->set('exception', $exception);
53:
54: $item->store();
55:
56: return $item;
57: }
58: }
59:
60: 61: 62: 63: 64: 65:
66: class cApiMailLogSuccess extends Item {
67:
68: 69: 70: 71: 72:
73: public function __construct($mId = false) {
74: global $cfg;
75: parent::__construct($cfg['tab']['mail_log_success'], 'idmailsuccess');
76: $this->setFilters(array(), array());
77: if ($mId !== false) {
78: $this->loadByPrimaryKey($mId);
79: }
80: }
81: }
82: