Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • 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
  • cApiArticleLanguageVersion
  • cApiArticleLanguageVersionCollection
  • cApiArticleSpecification
  • cApiArticleSpecificationCollection
  • cApiCategory
  • cApiCategoryArticle
  • cApiCategoryArticleCollection
  • cApiCategoryCollection
  • cApiCategoryLanguage
  • cApiCategoryLanguageCollection
  • cApiCategoryTree
  • cApiCategoryTreeCollection
  • cApiClient
  • cApiClientCollection
  • cApiClientLanguage
  • cApiClientLanguageCollection
  • cApiCommunication
  • cApiCommunicationCollection
  • cApiContainer
  • cApiContainerCollection
  • cApiContainerConfiguration
  • cApiContainerConfigurationCollection
  • cApiContent
  • cApiContentCollection
  • cApiContentVersion
  • cApiContentVersionCollection
  • 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
  • cApiMetaTagVersion
  • cApiMetaTagVersionCollection
  • cApiMetaType
  • cApiMetaTypeCollection
  • cApiModule
  • cApiModuleCollection
  • cApiNavMain
  • cApiNavMainCollection
  • cApiNavSub
  • cApiNavSubCollection
  • cApiOnlineUser
  • cApiOnlineUserCollection
  • cApiPathresolveCache
  • cApiPathresolveCacheCollection
  • cApiProperty
  • cApiPropertyCollection
  • cApiRight
  • cApiRightCollection
  • cApiSearchTracking
  • cApiSearchTrackingCollection
  • cApiStat
  • cApiStatCollection
  • cApiSystemProperty
  • cApiSystemPropertyCollection
  • cApiTemplate
  • cApiTemplateCollection
  • cApiTemplateConfiguration
  • cApiTemplateConfigurationCollection
  • cApiType
  • cApiTypeCollection
  • cApiUpload
  • cApiUploadCollection
  • cApiUploadMeta
  • cApiUploadMetaCollection
  • cApiUser
  • cApiUserCollection
  • cApiUserPasswordRequest
  • cApiUserPasswordRequestCollection
  • cApiUserProperty
  • cApiUserPropertyCollection
  • NoteCollection
  • NoteItem
  • TODOCollection
  • TODOItem
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: 
 3: /**
 4:  * This file contains the maillog collection and item class.
 5:  *
 6:  * @package Core
 7:  * @subpackage GenericDB_Model
 8:  * @author Simon Sprankel
 9:  * @copyright four for business AG <www.4fb.de>
10:  * @license http://www.contenido.org/license/LIZENZ.txt
11:  * @link http://www.4fb.de
12:  * @link http://www.contenido.org
13:  */
14: 
15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
16: 
17: /**
18:  * Mail log collection
19:  *
20:  * @package Core
21:  * @subpackage GenericDB_Model
22:  */
23: class cApiMailLogCollection extends ItemCollection {
24: 
25:     /**
26:      * Constructor to create an instance of this class.
27:      */
28:     public function __construct() {
29:         global $cfg;
30:         parent::__construct($cfg['tab']['mail_log'], 'idmail');
31:         $this->_setItemClass('cApiMailLog');
32:     }
33: 
34:     /**
35:      * Creates a new mail log entry with the given data.
36:      * @param string|array $from
37:      * @param string|array $to
38:      * @param string|array $replyTo
39:      * @param string|array $cc
40:      * @param string|array $bcc
41:      * @param string $subject
42:      * @param string $body
43:      * @param string $created
44:      *         timestamp!
45:      * @param string $charset
46:      * @param string $contentType
47:      * @return cApiMailLog
48:      */
49:     public function create($from, $to, $replyTo, $cc, $bcc, $subject, $body, $created, $charset, $contentType) {
50:         $item = $this->createNewItem();
51: 
52:         $item->set('from', json_encode($from));
53:         $item->set('to', json_encode($to));
54:         $item->set('reply_to', json_encode($replyTo));
55:         $item->set('cc', json_encode($cc));
56:         $item->set('bcc', json_encode($bcc));
57:         $item->set('subject', $subject);
58:         $item->set('body', $body);
59:         $date = date('Y-m-d H:i:s', $created);
60:         $item->set('created', $date, false);
61:         $idclient = cRegistry::getClientId();
62:         $item->set('idclient', $idclient);
63:         $idlang = cRegistry::getLanguageId();
64:         $item->set('idlang', $idlang);
65:         $item->set('charset', $charset);
66:         $item->set('content_type', $contentType);
67: 
68:         $item->store();
69: 
70:         return $item;
71:     }
72: }
73: 
74: /**
75:  * Mail log item
76:  *
77:  * @package Core
78:  * @subpackage GenericDB_Model
79:  */
80: class cApiMailLog extends Item {
81: 
82:     /**
83:      * Constructor to create an instance of this class.
84:      *
85:      * @param mixed $mId
86:      */
87:     public function __construct($mId = false) {
88:         global $cfg;
89:         parent::__construct($cfg['tab']['mail_log'], 'idmail');
90:         $this->setFilters(array(), array());
91:         if ($mId !== false) {
92:             $this->loadByPrimaryKey($mId);
93:         }
94:     }
95: }
96: 
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0