3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2016
31 * Generated from xml/schema/CRM/Core/MailSettings.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:16f3698a9997d082948fd562d6782962)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_MailSettings
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_mail_settings';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * Which Domain is this match entry for
64 * name of this group of settings
70 * whether this is the default set of settings for this domain
76 * email address domain (the part after @)
82 * optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)
88 * contents of the Return-Path header
94 * name of the protocol to use for polling (like IMAP, POP3 or Maildir)
100 * server to use when polling
106 * port to use when polling
112 * username to use when polling
118 * password to use when polling
124 * whether to use SSL or not
130 * folder to poll from when using IMAP, path to poll from when using Maildir, etc.
138 * @return civicrm_mail_settings
140 function __construct() {
141 $this->__table
= 'civicrm_mail_settings';
142 parent
::__construct();
145 * Returns foreign keys and entity references
148 * [CRM_Core_Reference_Interface]
150 static function getReferenceColumns() {
151 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
152 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
153 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
154 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
156 return Civi
::$statics[__CLASS__
]['links'];
159 * Returns all the column names of this table
163 static function &fields() {
164 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
165 Civi
::$statics[__CLASS__
]['fields'] = array(
168 'type' => CRM_Utils_Type
::T_INT
,
169 'title' => ts('Mail Settings ID') ,
170 'description' => 'primary key',
173 'domain_id' => array(
174 'name' => 'domain_id',
175 'type' => CRM_Utils_Type
::T_INT
,
176 'title' => ts('Mail Settings Domain') ,
177 'description' => 'Which Domain is this match entry for',
179 'FKClassName' => 'CRM_Core_DAO_Domain',
180 'pseudoconstant' => array(
181 'table' => 'civicrm_domain',
183 'labelColumn' => 'name',
188 'type' => CRM_Utils_Type
::T_STRING
,
189 'title' => ts('Mail Settings Name') ,
190 'description' => 'name of this group of settings',
192 'size' => CRM_Utils_Type
::HUGE
,
194 'is_default' => array(
195 'name' => 'is_default',
196 'type' => CRM_Utils_Type
::T_BOOLEAN
,
197 'title' => ts('Is Default Mail Settings?') ,
198 'description' => 'whether this is the default set of settings for this domain',
202 'type' => CRM_Utils_Type
::T_STRING
,
203 'title' => ts('email Domain') ,
204 'description' => 'email address domain (the part after @)',
206 'size' => CRM_Utils_Type
::HUGE
,
208 'localpart' => array(
209 'name' => 'localpart',
210 'type' => CRM_Utils_Type
::T_STRING
,
211 'title' => ts('email Local Part') ,
212 'description' => 'optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)',
214 'size' => CRM_Utils_Type
::HUGE
,
216 'return_path' => array(
217 'name' => 'return_path',
218 'type' => CRM_Utils_Type
::T_STRING
,
219 'title' => ts('Return Path') ,
220 'description' => 'contents of the Return-Path header',
222 'size' => CRM_Utils_Type
::HUGE
,
225 'name' => 'protocol',
226 'type' => CRM_Utils_Type
::T_STRING
,
227 'title' => ts('Protocol') ,
228 'description' => 'name of the protocol to use for polling (like IMAP, POP3 or Maildir)',
230 'size' => CRM_Utils_Type
::HUGE
,
234 'pseudoconstant' => array(
235 'optionGroupName' => 'mail_protocol',
236 'optionEditPath' => 'civicrm/admin/options/mail_protocol',
241 'type' => CRM_Utils_Type
::T_STRING
,
242 'title' => ts('Mail Server') ,
243 'description' => 'server to use when polling',
245 'size' => CRM_Utils_Type
::HUGE
,
249 'type' => CRM_Utils_Type
::T_INT
,
250 'title' => ts('Mail Port') ,
251 'description' => 'port to use when polling',
254 'name' => 'username',
255 'type' => CRM_Utils_Type
::T_STRING
,
256 'title' => ts('Mail Account Username') ,
257 'description' => 'username to use when polling',
259 'size' => CRM_Utils_Type
::HUGE
,
262 'name' => 'password',
263 'type' => CRM_Utils_Type
::T_STRING
,
264 'title' => ts('Mail Account Password') ,
265 'description' => 'password to use when polling',
267 'size' => CRM_Utils_Type
::HUGE
,
271 'type' => CRM_Utils_Type
::T_BOOLEAN
,
272 'title' => ts('Mail Account Uses SSL') ,
273 'description' => 'whether to use SSL or not',
277 'type' => CRM_Utils_Type
::T_STRING
,
278 'title' => ts('Mail Folder') ,
279 'description' => 'folder to poll from when using IMAP, path to poll from when using Maildir, etc.',
281 'size' => CRM_Utils_Type
::HUGE
,
284 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
286 return Civi
::$statics[__CLASS__
]['fields'];
289 * Return a mapping from field-name to the corresponding key (as used in fields()).
292 * Array(string $name => string $uniqueName).
294 static function &fieldKeys() {
295 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
296 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
298 return Civi
::$statics[__CLASS__
]['fieldKeys'];
301 * Returns the names of this table
305 static function getTableName() {
306 return self
::$_tableName;
309 * Returns if this table needs to be logged
317 * Returns the list of fields that can be imported
319 * @param bool $prefix
323 static function &import($prefix = false) {
324 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mail_settings', $prefix, array());
328 * Returns the list of fields that can be exported
330 * @param bool $prefix
334 static function &export($prefix = false) {
335 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mail_settings', $prefix, array());