3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
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-2017
31 * Generated from xml/schema/CRM/SMS/Provider.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:58f9deb2ac0314b717ef619c4ff8fdf0)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_SMS_DAO_Provider constructor.
40 class CRM_SMS_DAO_Provider
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_sms_provider';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Provider internal name points to option_value of option_group sms_provider_name
66 * Provider name visible to user
82 * points to value in civicrm_option_value for group sms_api_type
93 * the api params in xml, http or smtp format
111 function __construct() {
112 $this->__table
= 'civicrm_sms_provider';
113 parent
::__construct();
116 * Returns all the column names of this table
120 static function &fields() {
121 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
122 Civi
::$statics[__CLASS__
]['fields'] = array(
125 'type' => CRM_Utils_Type
::T_INT
,
126 'title' => ts('SMS Provider ID') ,
127 'description' => 'SMS Provider ID',
129 'table_name' => 'civicrm_sms_provider',
130 'entity' => 'Provider',
131 'bao' => 'CRM_SMS_BAO_Provider',
135 'type' => CRM_Utils_Type
::T_STRING
,
136 'title' => ts('SMS Provider Name') ,
137 'description' => 'Provider internal name points to option_value of option_group sms_provider_name',
139 'size' => CRM_Utils_Type
::BIG
,
140 'table_name' => 'civicrm_sms_provider',
141 'entity' => 'Provider',
142 'bao' => 'CRM_SMS_BAO_Provider',
146 'type' => CRM_Utils_Type
::T_STRING
,
147 'title' => ts('SMS Provider Title') ,
148 'description' => 'Provider name visible to user',
150 'size' => CRM_Utils_Type
::BIG
,
151 'table_name' => 'civicrm_sms_provider',
152 'entity' => 'Provider',
153 'bao' => 'CRM_SMS_BAO_Provider',
159 'name' => 'username',
160 'type' => CRM_Utils_Type
::T_STRING
,
161 'title' => ts('SMS Provider Username') ,
163 'size' => CRM_Utils_Type
::HUGE
,
164 'table_name' => 'civicrm_sms_provider',
165 'entity' => 'Provider',
166 'bao' => 'CRM_SMS_BAO_Provider',
172 'name' => 'password',
173 'type' => CRM_Utils_Type
::T_STRING
,
174 'title' => ts('SMS Provider Password') ,
176 'size' => CRM_Utils_Type
::HUGE
,
177 'table_name' => 'civicrm_sms_provider',
178 'entity' => 'Provider',
179 'bao' => 'CRM_SMS_BAO_Provider',
185 'name' => 'api_type',
186 'type' => CRM_Utils_Type
::T_INT
,
187 'title' => ts('SMS Provider API') ,
188 'description' => 'points to value in civicrm_option_value for group sms_api_type',
190 'table_name' => 'civicrm_sms_provider',
191 'entity' => 'Provider',
192 'bao' => 'CRM_SMS_BAO_Provider',
199 'type' => CRM_Utils_Type
::T_STRING
,
200 'title' => ts('SMS Provider API URL') ,
202 'size' => CRM_Utils_Type
::HUGE
,
203 'table_name' => 'civicrm_sms_provider',
204 'entity' => 'Provider',
205 'bao' => 'CRM_SMS_BAO_Provider',
210 'api_params' => array(
211 'name' => 'api_params',
212 'type' => CRM_Utils_Type
::T_TEXT
,
213 'title' => ts('SMS Provider API Params') ,
214 'description' => 'the api params in xml, http or smtp format',
215 'table_name' => 'civicrm_sms_provider',
216 'entity' => 'Provider',
217 'bao' => 'CRM_SMS_BAO_Provider',
222 'is_default' => array(
223 'name' => 'is_default',
224 'type' => CRM_Utils_Type
::T_BOOLEAN
,
225 'title' => ts('SMS Provider is Default?') ,
226 'table_name' => 'civicrm_sms_provider',
227 'entity' => 'Provider',
228 'bao' => 'CRM_SMS_BAO_Provider',
230 'type' => 'CheckBox',
233 'is_active' => array(
234 'name' => 'is_active',
235 'type' => CRM_Utils_Type
::T_BOOLEAN
,
236 'title' => ts('SMS Provider is Active?') ,
237 'table_name' => 'civicrm_sms_provider',
238 'entity' => 'Provider',
239 'bao' => 'CRM_SMS_BAO_Provider',
241 'type' => 'CheckBox',
245 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
247 return Civi
::$statics[__CLASS__
]['fields'];
250 * Return a mapping from field-name to the corresponding key (as used in fields()).
253 * Array(string $name => string $uniqueName).
255 static function &fieldKeys() {
256 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
257 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
259 return Civi
::$statics[__CLASS__
]['fieldKeys'];
262 * Returns the names of this table
266 static function getTableName() {
267 return self
::$_tableName;
270 * Returns if this table needs to be logged
278 * Returns the list of fields that can be imported
280 * @param bool $prefix
284 static function &import($prefix = false) {
285 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'sms_provider', $prefix, array());
289 * Returns the list of fields that can be exported
291 * @param bool $prefix
295 static function &export($prefix = false) {
296 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'sms_provider', $prefix, array());