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 instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
90 * Which Domain is this match entry for
96 * name of this group of settings
102 * whether this is the default set of settings for this domain
108 * email address domain (the part after @)
114 * optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)
120 * contents of the Return-Path header
126 * name of the protocol to use for polling (like IMAP, POP3 or Maildir)
132 * server to use when polling
138 * port to use when polling
144 * username to use when polling
150 * password to use when polling
156 * whether to use SSL or not
162 * folder to poll from when using IMAP, path to poll from when using Maildir, etc.
170 * @return civicrm_mail_settings
172 function __construct() {
173 $this->__table
= 'civicrm_mail_settings';
174 parent
::__construct();
177 * Returns foreign keys and entity references
180 * [CRM_Core_Reference_Interface]
182 static function getReferenceColumns() {
183 if (!self
::$_links) {
184 self
::$_links = static ::createReferenceColumns(__CLASS__
);
185 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
187 return self
::$_links;
190 * Returns all the column names of this table
194 static function &fields() {
195 if (!(self
::$_fields)) {
196 self
::$_fields = array(
199 'type' => CRM_Utils_Type
::T_INT
,
200 'title' => ts('Mail Settings ID') ,
201 'description' => 'primary key',
204 'domain_id' => array(
205 'name' => 'domain_id',
206 'type' => CRM_Utils_Type
::T_INT
,
207 'title' => ts('Mail Settings Domain') ,
208 'description' => 'Which Domain is this match entry for',
210 'FKClassName' => 'CRM_Core_DAO_Domain',
211 'pseudoconstant' => array(
212 'table' => 'civicrm_domain',
214 'labelColumn' => 'name',
219 'type' => CRM_Utils_Type
::T_STRING
,
220 'title' => ts('Mail Settings Name') ,
221 'description' => 'name of this group of settings',
223 'size' => CRM_Utils_Type
::HUGE
,
225 'is_default' => array(
226 'name' => 'is_default',
227 'type' => CRM_Utils_Type
::T_BOOLEAN
,
228 'title' => ts('Is Default Mail Settings?') ,
229 'description' => 'whether this is the default set of settings for this domain',
233 'type' => CRM_Utils_Type
::T_STRING
,
234 'title' => ts('email Domain') ,
235 'description' => 'email address domain (the part after @)',
237 'size' => CRM_Utils_Type
::HUGE
,
239 'localpart' => array(
240 'name' => 'localpart',
241 'type' => CRM_Utils_Type
::T_STRING
,
242 'title' => ts('email Local Part') ,
243 'description' => 'optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)',
245 'size' => CRM_Utils_Type
::HUGE
,
247 'return_path' => array(
248 'name' => 'return_path',
249 'type' => CRM_Utils_Type
::T_STRING
,
250 'title' => ts('Return Path') ,
251 'description' => 'contents of the Return-Path header',
253 'size' => CRM_Utils_Type
::HUGE
,
256 'name' => 'protocol',
257 'type' => CRM_Utils_Type
::T_STRING
,
258 'title' => ts('Protocol') ,
259 'description' => 'name of the protocol to use for polling (like IMAP, POP3 or Maildir)',
261 'size' => CRM_Utils_Type
::HUGE
,
265 'pseudoconstant' => array(
266 'optionGroupName' => 'mail_protocol',
267 'optionEditPath' => 'civicrm/admin/options/mail_protocol',
272 'type' => CRM_Utils_Type
::T_STRING
,
273 'title' => ts('Mail Server') ,
274 'description' => 'server to use when polling',
276 'size' => CRM_Utils_Type
::HUGE
,
280 'type' => CRM_Utils_Type
::T_INT
,
281 'title' => ts('Mail Port') ,
282 'description' => 'port to use when polling',
285 'name' => 'username',
286 'type' => CRM_Utils_Type
::T_STRING
,
287 'title' => ts('Mail Account Username') ,
288 'description' => 'username to use when polling',
290 'size' => CRM_Utils_Type
::HUGE
,
293 'name' => 'password',
294 'type' => CRM_Utils_Type
::T_STRING
,
295 'title' => ts('Mail Account Password') ,
296 'description' => 'password to use when polling',
298 'size' => CRM_Utils_Type
::HUGE
,
302 'type' => CRM_Utils_Type
::T_BOOLEAN
,
303 'title' => ts('Mail Account Uses SSL') ,
304 'description' => 'whether to use SSL or not',
308 'type' => CRM_Utils_Type
::T_STRING
,
309 'title' => ts('Mail Folder') ,
310 'description' => 'folder to poll from when using IMAP, path to poll from when using Maildir, etc.',
312 'size' => CRM_Utils_Type
::HUGE
,
316 return self
::$_fields;
319 * Returns an array containing, for each field, the arary key used for that
320 * field in self::$_fields.
324 static function &fieldKeys() {
325 if (!(self
::$_fieldKeys)) {
326 self
::$_fieldKeys = array(
328 'domain_id' => 'domain_id',
330 'is_default' => 'is_default',
331 'domain' => 'domain',
332 'localpart' => 'localpart',
333 'return_path' => 'return_path',
334 'protocol' => 'protocol',
335 'server' => 'server',
337 'username' => 'username',
338 'password' => 'password',
339 'is_ssl' => 'is_ssl',
340 'source' => 'source',
343 return self
::$_fieldKeys;
346 * Returns the names of this table
350 static function getTableName() {
351 return self
::$_tableName;
354 * Returns if this table needs to be logged
362 * Returns the list of fields that can be imported
364 * @param bool $prefix
368 static function &import($prefix = false) {
369 if (!(self
::$_import)) {
370 self
::$_import = array();
371 $fields = self
::fields();
372 foreach($fields as $name => $field) {
373 if (CRM_Utils_Array
::value('import', $field)) {
375 self
::$_import['mail_settings'] = & $fields[$name];
377 self
::$_import[$name] = & $fields[$name];
382 return self
::$_import;
385 * Returns the list of fields that can be exported
387 * @param bool $prefix
391 static function &export($prefix = false) {
392 if (!(self
::$_export)) {
393 self
::$_export = array();
394 $fields = self
::fields();
395 foreach($fields as $name => $field) {
396 if (CRM_Utils_Array
::value('export', $field)) {
398 self
::$_export['mail_settings'] = & $fields[$name];
400 self
::$_export[$name] = & $fields[$name];
405 return self
::$_export;