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
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
  1: <?php
  2: /**
  3:  * This file contains the communication collection and item class.
  4:  *
  5:  * @package          Core
  6:  * @subpackage       GenericDB_Model
  7:  * @version          SVN Revision $Rev:$
  8:  *
  9:  * @author           Murat Purc <murat@purc.de>
 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:  * Communication collection
 20:  *
 21:  * @package Core
 22:  * @subpackage GenericDB_Model
 23:  */
 24: class cApiCommunicationCollection extends ItemCollection {
 25: 
 26:     /**
 27:      * Constructor Function
 28:      */
 29:     public function __construct() {
 30:         global $cfg;
 31:         parent::__construct($cfg['tab']['communications'], 'idcommunication');
 32:         $this->_setItemClass('cApiCommunication');
 33: 
 34:         // set the join partners so that joins can be used via link() method
 35:         $this->_setJoinPartner('cApiClientCollection');
 36:     }
 37: 
 38:     /**
 39:      * Creates a new communication item.
 40:      *
 41:      * @return cApiCommunication
 42:      */
 43:     public function create() {
 44:         global $auth, $client;
 45:         $item = $this->createNewItem();
 46: 
 47:         $item->set('idclient', $client);
 48:         $item->set('author', $auth->auth['uid']);
 49:         $item->set('created', date('Y-m-d H:i:s'), false);
 50: 
 51:         return $item;
 52:     }
 53: 
 54: }
 55: 
 56: /**
 57:  * Communication item
 58:  *
 59:  * @package Core
 60:  * @subpackage GenericDB_Model
 61:  */
 62: class cApiCommunication extends Item {
 63: 
 64:     /**
 65:      * Constructor Function
 66:      *
 67:      * @param mixed $mId Specifies the ID of item to load
 68:      */
 69:     public function __construct($mId = false) {
 70:         global $cfg;
 71:         parent::__construct($cfg['tab']['communications'], 'idcommunication');
 72:         if ($mId !== false) {
 73:             $this->loadByPrimaryKey($mId);
 74:         }
 75:     }
 76: 
 77:     /**
 78:      * Saves a communication item
 79:      */
 80:     public function store() {
 81:         global $auth;
 82:         $this->set('modifiedby', $auth->auth['uid']);
 83:         $this->set('modified', date('Y-m-d H:i:s'), false);
 84: 
 85:         return parent::store();
 86:     }
 87: 
 88:     /**
 89:      * Userdefined setter for communcation fields.
 90:      *
 91:      * @param string $name
 92:      * @param mixed $value
 93:      * @param bool $bSafe Flag to run defined inFilter on passed value
 94:      */
 95:     public function setField($name, $value, $bSafe = true) {
 96:         switch ($name) {
 97:             case 'idclient':
 98:                 $value = (int) $value;
 99:                 break;
100:         }
101: 
102:         return parent::setField($name, $value, $bSafe);
103:     }
104: 
105: }
106: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen