Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cApiAction
  • cApiActionCollection
  • cApiActionlog
  • cApiActionlogCollection
  • cApiArea
  • cApiAreaCollection
  • cApiArticle
  • cApiArticleCollection
  • cApiArticleLanguage
  • cApiArticleLanguageCollection
  • cApiArticleSpecification
  • cApiArticleSpecificationCollection
  • cApiCategory
  • cApiCategoryArticle
  • cApiCategoryArticleCollection
  • cApiCategoryCollection
  • cApiCategoryLanguage
  • cApiCategoryLanguageCollection
  • cApiCategoryTree
  • cApiCategoryTreeCollection
  • cApiClient
  • cApiClientCollection
  • cApiClientLanguage
  • cApiClientLanguageCollection
  • cApiCommunication
  • cApiCommunicationCollection
  • cApiContainer
  • cApiContainerCollection
  • cApiContainerConfiguration
  • cApiContainerConfigurationCollection
  • cApiContent
  • cApiContentCollection
  • cApiDbfs
  • cApiDbfsCollection
  • cApiFile
  • cApiFileCollection
  • cApiFileInformation
  • cApiFileInformationCollection
  • cApiFrameFile
  • cApiFrameFileCollection
  • cApiFrontendGroup
  • cApiFrontendGroupCollection
  • cApiFrontendGroupMember
  • cApiFrontendGroupMemberCollection
  • cApiFrontendPermission
  • cApiFrontendPermissionCollection
  • cApiFrontendUser
  • cApiFrontendUserCollection
  • cApiGroup
  • cApiGroupCollection
  • cApiGroupMember
  • cApiGroupMemberCollection
  • cApiGroupProperty
  • cApiGroupPropertyCollection
  • cApiInUse
  • cApiInUseCollection
  • cApiIso3166
  • cApiIso3166Collection
  • cApiIso6392
  • cApiIso6392Collection
  • cApiKeyword
  • cApiKeywordCollection
  • cApiLanguage
  • cApiLanguageCollection
  • cApiLayout
  • cApiLayoutCollection
  • cApiMailLog
  • cApiMailLogCollection
  • cApiMailLogSuccess
  • cApiMailLogSuccessCollection
  • cApiMetaTag
  • cApiMetaTagCollection
  • cApiMetaType
  • cApiMetaTypeCollection
  • cApiModule
  • cApiModuleCollection
  • cApiNavMain
  • cApiNavMainCollection
  • cApiNavSub
  • cApiNavSubCollection
  • cApiOnlineUser
  • cApiOnlineUserCollection
  • cApiPathresolveCache
  • cApiPathresolveCacheCollection
  • cApiProperty
  • cApiPropertyCollection
  • cApiRight
  • cApiRightCollection
  • cApiStat
  • cApiStatCollection
  • cApiSystemProperty
  • cApiSystemPropertyCollection
  • cApiTemplate
  • cApiTemplateCollection
  • cApiTemplateConfiguration
  • cApiTemplateConfigurationCollection
  • cApiType
  • cApiTypeCollection
  • cApiUpload
  • cApiUploadCollection
  • cApiUploadMeta
  • cApiUploadMetaCollection
  • cApiUser
  • cApiUserCollection
  • cApiUserProperty
  • cApiUserPropertyCollection
  • NoteCollection
  • NoteItem
  • TODOCollection
  • TODOItem
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the maillog collection and item class.
 4:  *
 5:  * @package Core
 6:  * @subpackage GenericDB_Model
 7:  * @version SVN Revision $Rev:$
 8:  *
 9:  * @author Simon Sprankel
10:  * @copyright four for business AG <www.4fb.de>
11:  * @license http://www.contenido.org/license/LIZENZ.txt
12:  * @link http://www.4fb.de
13:  * @link http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Mail log collection
20:  *
21:  * @package Core
22:  * @subpackage GenericDB_Model
23:  */
24: class cApiMailLogCollection extends ItemCollection {
25: 
26:     /**
27:      * Constructor
28:      */
29:     public function __construct() {
30:         global $cfg;
31:         parent::__construct($cfg['tab']['mail_log'], 'idmail');
32:         $this->_setItemClass('cApiMailLog');
33:     }
34: 
35:     /**
36:      * Creates a new mail log entry with the given data.
37:      *
38:      * @param string|array $from
39:      * @param string|array $to
40:      * @param string|array $replyTo
41:      * @param string|array $cc
42:      * @param string|array $bcc
43:      * @param string $subject
44:      * @param string $body
45:      * @param string $created timestamp!
46:      * @param string $charset
47:      * @param string $contentType
48:      * @return int the idmail of the newly created mail
49:      */
50:     public function create($from, $to, $replyTo, $cc, $bcc, $subject, $body, $created, $charset, $contentType) {
51:         $item = parent::createNewItem();
52: 
53:         $item->set('from', json_encode($from));
54:         $item->set('to', json_encode($to));
55:         $item->set('reply_to', json_encode($replyTo));
56:         $item->set('cc', json_encode($cc));
57:         $item->set('bcc', json_encode($bcc));
58:         $item->set('subject', $subject);
59:         $item->set('body', $body);
60:         $date = date('Y-m-d H:i:s', $created);
61:         $item->set('created', $date, false);
62:         $idclient = cRegistry::getClientId();
63:         $item->set('idclient', $idclient);
64:         $idlang = cRegistry::getLanguageId();
65:         $item->set('idlang', $idlang);
66:         $item->set('charset', $charset);
67:         $item->set('content_type', $contentType);
68: 
69:         $item->store();
70: 
71:         return $item->get('idmail');
72:     }
73: }
74: 
75: /**
76:  * Mail log item
77:  *
78:  * @package Core
79:  * @subpackage GenericDB_Model
80:  */
81: class cApiMailLog extends Item {
82: 
83:     /**
84:      * Constructor
85:      *
86:      * @param mixed $mId
87:      */
88:     public function __construct($mId = false) {
89:         global $cfg;
90:         parent::__construct($cfg['tab']['mail_log'], 'idmail');
91:         $this->setFilters(array(), array());
92:         if ($mId !== false) {
93:             $this->loadByPrimaryKey($mId);
94:         }
95:     }
96: }
97: 
CMS CONTENIDO 4.9.2 API documentation generated by ApiGen 2.8.0