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 instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
76 * Which Domain is this match entry for
82 * name of this group of settings
88 * whether this is the default set of settings for this domain
94 * email address domain (the part after @)
100 * optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)
106 * contents of the Return-Path header
112 * name of the protocol to use for polling (like IMAP, POP3 or Maildir)
118 * server to use when polling
124 * port to use when polling
130 * username to use when polling
136 * password to use when polling
142 * whether to use SSL or not
148 * folder to poll from when using IMAP, path to poll from when using Maildir, etc.
156 * @return civicrm_mail_settings
158 function __construct() {
159 $this->__table
= 'civicrm_mail_settings';
160 parent
::__construct();
163 * Returns foreign keys and entity references
166 * [CRM_Core_Reference_Interface]
168 static function getReferenceColumns() {
169 if (!self
::$_links) {
170 self
::$_links = static ::createReferenceColumns(__CLASS__
);
171 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
173 return self
::$_links;
176 * Returns all the column names of this table
180 static function &fields() {
181 if (!(self
::$_fields)) {
182 self
::$_fields = array(
185 'type' => CRM_Utils_Type
::T_INT
,
186 'title' => ts('Mail Settings ID') ,
187 'description' => 'primary key',
190 'domain_id' => array(
191 'name' => 'domain_id',
192 'type' => CRM_Utils_Type
::T_INT
,
193 'title' => ts('Mail Settings Domain') ,
194 'description' => 'Which Domain is this match entry for',
196 'FKClassName' => 'CRM_Core_DAO_Domain',
197 'pseudoconstant' => array(
198 'table' => 'civicrm_domain',
200 'labelColumn' => 'name',
205 'type' => CRM_Utils_Type
::T_STRING
,
206 'title' => ts('Mail Settings Name') ,
207 'description' => 'name of this group of settings',
209 'size' => CRM_Utils_Type
::HUGE
,
211 'is_default' => array(
212 'name' => 'is_default',
213 'type' => CRM_Utils_Type
::T_BOOLEAN
,
214 'title' => ts('Is Default Mail Settings?') ,
215 'description' => 'whether this is the default set of settings for this domain',
219 'type' => CRM_Utils_Type
::T_STRING
,
220 'title' => ts('email Domain') ,
221 'description' => 'email address domain (the part after @)',
223 'size' => CRM_Utils_Type
::HUGE
,
225 'localpart' => array(
226 'name' => 'localpart',
227 'type' => CRM_Utils_Type
::T_STRING
,
228 'title' => ts('email Local Part') ,
229 'description' => 'optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)',
231 'size' => CRM_Utils_Type
::HUGE
,
233 'return_path' => array(
234 'name' => 'return_path',
235 'type' => CRM_Utils_Type
::T_STRING
,
236 'title' => ts('Return Path') ,
237 'description' => 'contents of the Return-Path header',
239 'size' => CRM_Utils_Type
::HUGE
,
242 'name' => 'protocol',
243 'type' => CRM_Utils_Type
::T_STRING
,
244 'title' => ts('Protocol') ,
245 'description' => 'name of the protocol to use for polling (like IMAP, POP3 or Maildir)',
247 'size' => CRM_Utils_Type
::HUGE
,
251 'pseudoconstant' => array(
252 'optionGroupName' => 'mail_protocol',
253 'optionEditPath' => 'civicrm/admin/options/mail_protocol',
258 'type' => CRM_Utils_Type
::T_STRING
,
259 'title' => ts('Mail Server') ,
260 'description' => 'server to use when polling',
262 'size' => CRM_Utils_Type
::HUGE
,
266 'type' => CRM_Utils_Type
::T_INT
,
267 'title' => ts('Mail Port') ,
268 'description' => 'port to use when polling',
271 'name' => 'username',
272 'type' => CRM_Utils_Type
::T_STRING
,
273 'title' => ts('Mail Account Username') ,
274 'description' => 'username to use when polling',
276 'size' => CRM_Utils_Type
::HUGE
,
279 'name' => 'password',
280 'type' => CRM_Utils_Type
::T_STRING
,
281 'title' => ts('Mail Account Password') ,
282 'description' => 'password to use when polling',
284 'size' => CRM_Utils_Type
::HUGE
,
288 'type' => CRM_Utils_Type
::T_BOOLEAN
,
289 'title' => ts('Mail Account Uses SSL') ,
290 'description' => 'whether to use SSL or not',
294 'type' => CRM_Utils_Type
::T_STRING
,
295 'title' => ts('Mail Folder') ,
296 'description' => 'folder to poll from when using IMAP, path to poll from when using Maildir, etc.',
298 'size' => CRM_Utils_Type
::HUGE
,
302 return self
::$_fields;
305 * Returns an array containing, for each field, the arary key used for that
306 * field in self::$_fields.
310 static function &fieldKeys() {
311 if (!(self
::$_fieldKeys)) {
312 self
::$_fieldKeys = array(
314 'domain_id' => 'domain_id',
316 'is_default' => 'is_default',
317 'domain' => 'domain',
318 'localpart' => 'localpart',
319 'return_path' => 'return_path',
320 'protocol' => 'protocol',
321 'server' => 'server',
323 'username' => 'username',
324 'password' => 'password',
325 'is_ssl' => 'is_ssl',
326 'source' => 'source',
329 return self
::$_fieldKeys;
332 * Returns the names of this table
336 static function getTableName() {
337 return self
::$_tableName;
340 * Returns if this table needs to be logged
348 * Returns the list of fields that can be imported
350 * @param bool $prefix
354 static function &import($prefix = false) {
355 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mail_settings', $prefix, array());
359 * Returns the list of fields that can be exported
361 * @param bool $prefix
365 static function &export($prefix = false) {
366 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mail_settings', $prefix, array());