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/Persistent.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:9b08831f82375bb41e0f54c03b69b79e)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_Persistent
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_persistent';
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
84 * Persistent Record Id
90 * Context for which name data pair is to be stored
102 * data associated with name
116 * @return civicrm_persistent
118 function __construct() {
119 $this->__table
= 'civicrm_persistent';
120 parent
::__construct();
123 * Returns all the column names of this table
127 static function &fields() {
128 if (!(self
::$_fields)) {
129 self
::$_fields = array(
132 'type' => CRM_Utils_Type
::T_INT
,
133 'title' => ts('Persistent ID') ,
134 'description' => 'Persistent Record Id',
139 'type' => CRM_Utils_Type
::T_STRING
,
140 'title' => ts('Context') ,
141 'description' => 'Context for which name data pair is to be stored',
144 'size' => CRM_Utils_Type
::HUGE
,
148 'type' => CRM_Utils_Type
::T_STRING
,
149 'title' => ts('Name') ,
150 'description' => 'Name of Context',
153 'size' => CRM_Utils_Type
::HUGE
,
157 'type' => CRM_Utils_Type
::T_LONGTEXT
,
158 'title' => ts('Data') ,
159 'description' => 'data associated with name',
161 'is_config' => array(
162 'name' => 'is_config',
163 'type' => CRM_Utils_Type
::T_BOOLEAN
,
164 'title' => ts('Is Configuration?') ,
165 'description' => 'Config Settings',
170 return self
::$_fields;
173 * Returns an array containing, for each field, the arary key used for that
174 * field in self::$_fields.
178 static function &fieldKeys() {
179 if (!(self
::$_fieldKeys)) {
180 self
::$_fieldKeys = array(
182 'context' => 'context',
185 'is_config' => 'is_config',
188 return self
::$_fieldKeys;
191 * Returns the names of this table
195 static function getTableName() {
196 return self
::$_tableName;
199 * Returns if this table needs to be logged
207 * Returns the list of fields that can be imported
209 * @param bool $prefix
213 static function &import($prefix = false) {
214 if (!(self
::$_import)) {
215 self
::$_import = array();
216 $fields = self
::fields();
217 foreach($fields as $name => $field) {
218 if (CRM_Utils_Array
::value('import', $field)) {
220 self
::$_import['persistent'] = & $fields[$name];
222 self
::$_import[$name] = & $fields[$name];
227 return self
::$_import;
230 * Returns the list of fields that can be exported
232 * @param bool $prefix
236 static function &export($prefix = false) {
237 if (!(self
::$_export)) {
238 self
::$_export = array();
239 $fields = self
::fields();
240 foreach($fields as $name => $field) {
241 if (CRM_Utils_Array
::value('export', $field)) {
243 self
::$_export['persistent'] = & $fields[$name];
245 self
::$_export[$name] = & $fields[$name];
250 return self
::$_export;