3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
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-2015
31 * Generated from xml/schema/CRM/Core/MailSettings.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Core_DAO_MailSettings
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_mail_settings';
44 * static instance to hold the field values
48 static $_fields = null;
50 * static instance to hold the keys used in $_fields for each field.
54 static $_fieldKeys = null;
56 * static instance to hold the FK relationships
60 static $_links = null;
62 * static instance to hold the values that can
67 static $_import = null;
69 * static instance to hold the values that can
74 static $_export = null;
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
89 * Which Domain is this match entry for
95 * name of this group of settings
101 * whether this is the default set of settings for this domain
107 * email address domain (the part after @)
113 * optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)
119 * contents of the Return-Path header
125 * name of the protocol to use for polling (like IMAP, POP3 or Maildir)
131 * server to use when polling
137 * port to use when polling
143 * username to use when polling
149 * password to use when polling
155 * whether to use SSL or not
161 * folder to poll from when using IMAP, path to poll from when using Maildir, etc.
169 * @return civicrm_mail_settings
171 function __construct() {
172 $this->__table
= 'civicrm_mail_settings';
173 parent
::__construct();
176 * Returns foreign keys and entity references
179 * [CRM_Core_Reference_Interface]
181 static function getReferenceColumns() {
182 if (!self
::$_links) {
183 self
::$_links = static ::createReferenceColumns(__CLASS__
);
184 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
186 return self
::$_links;
189 * Returns all the column names of this table
193 static function &fields() {
194 if (!(self
::$_fields)) {
195 self
::$_fields = array(
198 'type' => CRM_Utils_Type
::T_INT
,
199 'title' => ts('Mail Settings ID') ,
200 'description' => 'primary key',
203 'domain_id' => array(
204 'name' => 'domain_id',
205 'type' => CRM_Utils_Type
::T_INT
,
206 'title' => ts('Mail Settings Domain') ,
207 'description' => 'Which Domain is this match entry for',
209 'FKClassName' => 'CRM_Core_DAO_Domain',
210 'pseudoconstant' => array(
211 'table' => 'civicrm_domain',
213 'labelColumn' => 'name',
218 'type' => CRM_Utils_Type
::T_STRING
,
219 'title' => ts('Mail Settings Name') ,
220 'description' => 'name of this group of settings',
222 'size' => CRM_Utils_Type
::HUGE
,
224 'is_default' => array(
225 'name' => 'is_default',
226 'type' => CRM_Utils_Type
::T_BOOLEAN
,
227 'title' => ts('Is Default Mail Settings?') ,
228 'description' => 'whether this is the default set of settings for this domain',
232 'type' => CRM_Utils_Type
::T_STRING
,
233 'title' => ts('email Domain') ,
234 'description' => 'email address domain (the part after @)',
236 'size' => CRM_Utils_Type
::HUGE
,
238 'localpart' => array(
239 'name' => 'localpart',
240 'type' => CRM_Utils_Type
::T_STRING
,
241 'title' => ts('email Local Part') ,
242 'description' => 'optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)',
244 'size' => CRM_Utils_Type
::HUGE
,
246 'return_path' => array(
247 'name' => 'return_path',
248 'type' => CRM_Utils_Type
::T_STRING
,
249 'title' => ts('Return Path') ,
250 'description' => 'contents of the Return-Path header',
252 'size' => CRM_Utils_Type
::HUGE
,
255 'name' => 'protocol',
256 'type' => CRM_Utils_Type
::T_STRING
,
257 'title' => ts('Protocol') ,
258 'description' => 'name of the protocol to use for polling (like IMAP, POP3 or Maildir)',
260 'size' => CRM_Utils_Type
::HUGE
,
264 'pseudoconstant' => array(
265 'optionGroupName' => 'mail_protocol',
266 'optionEditPath' => 'civicrm/admin/options/mail_protocol',
271 'type' => CRM_Utils_Type
::T_STRING
,
272 'title' => ts('Mail Server') ,
273 'description' => 'server to use when polling',
275 'size' => CRM_Utils_Type
::HUGE
,
279 'type' => CRM_Utils_Type
::T_INT
,
280 'title' => ts('Mail Port') ,
281 'description' => 'port to use when polling',
284 'name' => 'username',
285 'type' => CRM_Utils_Type
::T_STRING
,
286 'title' => ts('Mail Account Username') ,
287 'description' => 'username to use when polling',
289 'size' => CRM_Utils_Type
::HUGE
,
292 'name' => 'password',
293 'type' => CRM_Utils_Type
::T_STRING
,
294 'title' => ts('Mail Account Password') ,
295 'description' => 'password to use when polling',
297 'size' => CRM_Utils_Type
::HUGE
,
301 'type' => CRM_Utils_Type
::T_BOOLEAN
,
302 'title' => ts('Mail Account Uses SSL') ,
303 'description' => 'whether to use SSL or not',
307 'type' => CRM_Utils_Type
::T_STRING
,
308 'title' => ts('Mail Folder') ,
309 'description' => 'folder to poll from when using IMAP, path to poll from when using Maildir, etc.',
311 'size' => CRM_Utils_Type
::HUGE
,
315 return self
::$_fields;
318 * Returns an array containing, for each field, the arary key used for that
319 * field in self::$_fields.
323 static function &fieldKeys() {
324 if (!(self
::$_fieldKeys)) {
325 self
::$_fieldKeys = array(
327 'domain_id' => 'domain_id',
329 'is_default' => 'is_default',
330 'domain' => 'domain',
331 'localpart' => 'localpart',
332 'return_path' => 'return_path',
333 'protocol' => 'protocol',
334 'server' => 'server',
336 'username' => 'username',
337 'password' => 'password',
338 'is_ssl' => 'is_ssl',
339 'source' => 'source',
342 return self
::$_fieldKeys;
345 * Returns the names of this table
349 static function getTableName() {
350 return self
::$_tableName;
353 * Returns if this table needs to be logged
361 * Returns the list of fields that can be imported
363 * @param bool $prefix
367 static function &import($prefix = false) {
368 if (!(self
::$_import)) {
369 self
::$_import = array();
370 $fields = self
::fields();
371 foreach($fields as $name => $field) {
372 if (CRM_Utils_Array
::value('import', $field)) {
374 self
::$_import['mail_settings'] = & $fields[$name];
376 self
::$_import[$name] = & $fields[$name];
381 return self
::$_import;
384 * Returns the list of fields that can be exported
386 * @param bool $prefix
390 static function &export($prefix = false) {
391 if (!(self
::$_export)) {
392 self
::$_export = array();
393 $fields = self
::fields();
394 foreach($fields as $name => $field) {
395 if (CRM_Utils_Array
::value('export', $field)) {
397 self
::$_export['mail_settings'] = & $fields[$name];
399 self
::$_export[$name] = & $fields[$name];
404 return self
::$_export;