commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / CRM / Financial / DAO / PaymentProcessorType.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
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. |
13 | |
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. |
18 | |
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 +--------------------------------------------------------------------+
26 */
27 /**
28 * @package CRM
29 * @copyright CiviCRM LLC (c) 2004-2015
30 *
31 * Generated from xml/schema/CRM/Financial/PaymentProcessorType.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 */
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO {
37 /**
38 * static instance to hold the table name
39 *
40 * @var string
41 */
42 static $_tableName = 'civicrm_payment_processor_type';
43 /**
44 * static instance to hold the field values
45 *
46 * @var array
47 */
48 static $_fields = null;
49 /**
50 * static instance to hold the keys used in $_fields for each field.
51 *
52 * @var array
53 */
54 static $_fieldKeys = null;
55 /**
56 * static instance to hold the FK relationships
57 *
58 * @var string
59 */
60 static $_links = null;
61 /**
62 * static instance to hold the values that can
63 * be imported
64 *
65 * @var array
66 */
67 static $_import = null;
68 /**
69 * static instance to hold the values that can
70 * be exported
71 *
72 * @var array
73 */
74 static $_export = null;
75 /**
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
78 *
79 * @var boolean
80 */
81 static $_log = false;
82 /**
83 * Payment Processor Type ID
84 *
85 * @var int unsigned
86 */
87 public $id;
88 /**
89 * Payment Processor Name.
90 *
91 * @var string
92 */
93 public $name;
94 /**
95 * Payment Processor Name.
96 *
97 * @var string
98 */
99 public $title;
100 /**
101 * Payment Processor Description.
102 *
103 * @var string
104 */
105 public $description;
106 /**
107 * Is this processor active?
108 *
109 * @var boolean
110 */
111 public $is_active;
112 /**
113 * Is this processor the default?
114 *
115 * @var boolean
116 */
117 public $is_default;
118 /**
119 *
120 * @var string
121 */
122 public $user_name_label;
123 /**
124 *
125 * @var string
126 */
127 public $password_label;
128 /**
129 *
130 * @var string
131 */
132 public $signature_label;
133 /**
134 *
135 * @var string
136 */
137 public $subject_label;
138 /**
139 *
140 * @var string
141 */
142 public $class_name;
143 /**
144 *
145 * @var string
146 */
147 public $url_site_default;
148 /**
149 *
150 * @var string
151 */
152 public $url_api_default;
153 /**
154 *
155 * @var string
156 */
157 public $url_recur_default;
158 /**
159 *
160 * @var string
161 */
162 public $url_button_default;
163 /**
164 *
165 * @var string
166 */
167 public $url_site_test_default;
168 /**
169 *
170 * @var string
171 */
172 public $url_api_test_default;
173 /**
174 *
175 * @var string
176 */
177 public $url_recur_test_default;
178 /**
179 *
180 * @var string
181 */
182 public $url_button_test_default;
183 /**
184 * Billing Mode
185 *
186 * @var int unsigned
187 */
188 public $billing_mode;
189 /**
190 * Can process recurring contributions
191 *
192 * @var boolean
193 */
194 public $is_recur;
195 /**
196 * Payment Type: Credit or Debit
197 *
198 * @var int unsigned
199 */
200 public $payment_type;
201 /**
202 * class constructor
203 *
204 * @return civicrm_payment_processor_type
205 */
206 function __construct() {
207 $this->__table = 'civicrm_payment_processor_type';
208 parent::__construct();
209 }
210 /**
211 * Returns all the column names of this table
212 *
213 * @return array
214 */
215 static function &fields() {
216 if (!(self::$_fields)) {
217 self::$_fields = array(
218 'id' => array(
219 'name' => 'id',
220 'type' => CRM_Utils_Type::T_INT,
221 'title' => ts('Payment Processor Type ID') ,
222 'description' => 'Payment Processor Type ID',
223 'required' => true,
224 ) ,
225 'name' => array(
226 'name' => 'name',
227 'type' => CRM_Utils_Type::T_STRING,
228 'title' => ts('Payment Processor variable name to be used in code') ,
229 'description' => 'Payment Processor Name.',
230 'maxlength' => 64,
231 'size' => CRM_Utils_Type::BIG,
232 ) ,
233 'title' => array(
234 'name' => 'title',
235 'type' => CRM_Utils_Type::T_STRING,
236 'title' => ts('Payment Processor Title') ,
237 'description' => 'Payment Processor Name.',
238 'maxlength' => 127,
239 'size' => CRM_Utils_Type::HUGE,
240 ) ,
241 'description' => array(
242 'name' => 'description',
243 'type' => CRM_Utils_Type::T_STRING,
244 'title' => ts('Processor Type Description') ,
245 'description' => 'Payment Processor Description.',
246 'maxlength' => 255,
247 'size' => CRM_Utils_Type::HUGE,
248 ) ,
249 'is_active' => array(
250 'name' => 'is_active',
251 'type' => CRM_Utils_Type::T_BOOLEAN,
252 'title' => ts('Processor Type Is Active?') ,
253 'description' => 'Is this processor active?',
254 ) ,
255 'is_default' => array(
256 'name' => 'is_default',
257 'type' => CRM_Utils_Type::T_BOOLEAN,
258 'title' => ts('Processor Type is Default?') ,
259 'description' => 'Is this processor the default?',
260 ) ,
261 'user_name_label' => array(
262 'name' => 'user_name_label',
263 'type' => CRM_Utils_Type::T_STRING,
264 'title' => ts('Label for User Name if used') ,
265 'maxlength' => 255,
266 'size' => CRM_Utils_Type::HUGE,
267 ) ,
268 'password_label' => array(
269 'name' => 'password_label',
270 'type' => CRM_Utils_Type::T_STRING,
271 'title' => ts('Label for password') ,
272 'maxlength' => 255,
273 'size' => CRM_Utils_Type::HUGE,
274 ) ,
275 'signature_label' => array(
276 'name' => 'signature_label',
277 'type' => CRM_Utils_Type::T_STRING,
278 'title' => ts('Label for Signature') ,
279 'maxlength' => 255,
280 'size' => CRM_Utils_Type::HUGE,
281 ) ,
282 'subject_label' => array(
283 'name' => 'subject_label',
284 'type' => CRM_Utils_Type::T_STRING,
285 'title' => ts('Label for Subject') ,
286 'maxlength' => 255,
287 'size' => CRM_Utils_Type::HUGE,
288 ) ,
289 'class_name' => array(
290 'name' => 'class_name',
291 'type' => CRM_Utils_Type::T_STRING,
292 'title' => ts('Suffix for PHP clas name implementation') ,
293 'maxlength' => 255,
294 'size' => CRM_Utils_Type::HUGE,
295 ) ,
296 'url_site_default' => array(
297 'name' => 'url_site_default',
298 'type' => CRM_Utils_Type::T_STRING,
299 'title' => ts('Default Live Site URL') ,
300 'maxlength' => 255,
301 'size' => CRM_Utils_Type::HUGE,
302 ) ,
303 'url_api_default' => array(
304 'name' => 'url_api_default',
305 'type' => CRM_Utils_Type::T_STRING,
306 'title' => ts('Default API Site URL') ,
307 'maxlength' => 255,
308 'size' => CRM_Utils_Type::HUGE,
309 ) ,
310 'url_recur_default' => array(
311 'name' => 'url_recur_default',
312 'type' => CRM_Utils_Type::T_STRING,
313 'title' => ts('Default Live Recurring Payments URL') ,
314 'maxlength' => 255,
315 'size' => CRM_Utils_Type::HUGE,
316 ) ,
317 'url_button_default' => array(
318 'name' => 'url_button_default',
319 'type' => CRM_Utils_Type::T_STRING,
320 'title' => ts('Default Live Button URL') ,
321 'maxlength' => 255,
322 'size' => CRM_Utils_Type::HUGE,
323 ) ,
324 'url_site_test_default' => array(
325 'name' => 'url_site_test_default',
326 'type' => CRM_Utils_Type::T_STRING,
327 'title' => ts('Default Test Site URL') ,
328 'maxlength' => 255,
329 'size' => CRM_Utils_Type::HUGE,
330 ) ,
331 'url_api_test_default' => array(
332 'name' => 'url_api_test_default',
333 'type' => CRM_Utils_Type::T_STRING,
334 'title' => ts('Default Test API URL') ,
335 'maxlength' => 255,
336 'size' => CRM_Utils_Type::HUGE,
337 ) ,
338 'url_recur_test_default' => array(
339 'name' => 'url_recur_test_default',
340 'type' => CRM_Utils_Type::T_STRING,
341 'title' => ts('Default Test Recurring Payment URL') ,
342 'maxlength' => 255,
343 'size' => CRM_Utils_Type::HUGE,
344 ) ,
345 'url_button_test_default' => array(
346 'name' => 'url_button_test_default',
347 'type' => CRM_Utils_Type::T_STRING,
348 'title' => ts('Default Test Button URL') ,
349 'maxlength' => 255,
350 'size' => CRM_Utils_Type::HUGE,
351 ) ,
352 'billing_mode' => array(
353 'name' => 'billing_mode',
354 'type' => CRM_Utils_Type::T_INT,
355 'title' => ts('Billing Mode') ,
356 'description' => 'Billing Mode',
357 'required' => true,
358 'html' => array(
359 'type' => 'Select',
360 ) ,
361 'pseudoconstant' => array(
362 'callback' => 'CRM_Core_SelectValues::billingMode',
363 )
364 ) ,
365 'is_recur' => array(
366 'name' => 'is_recur',
367 'type' => CRM_Utils_Type::T_BOOLEAN,
368 'title' => ts('Processor Type Supports Recurring?') ,
369 'description' => 'Can process recurring contributions',
370 ) ,
371 'payment_type' => array(
372 'name' => 'payment_type',
373 'type' => CRM_Utils_Type::T_INT,
374 'title' => ts('Processor Type Payment Type') ,
375 'description' => 'Payment Type: Credit or Debit',
376 'default' => '1',
377 ) ,
378 );
379 }
380 return self::$_fields;
381 }
382 /**
383 * Returns an array containing, for each field, the arary key used for that
384 * field in self::$_fields.
385 *
386 * @return array
387 */
388 static function &fieldKeys() {
389 if (!(self::$_fieldKeys)) {
390 self::$_fieldKeys = array(
391 'id' => 'id',
392 'name' => 'name',
393 'title' => 'title',
394 'description' => 'description',
395 'is_active' => 'is_active',
396 'is_default' => 'is_default',
397 'user_name_label' => 'user_name_label',
398 'password_label' => 'password_label',
399 'signature_label' => 'signature_label',
400 'subject_label' => 'subject_label',
401 'class_name' => 'class_name',
402 'url_site_default' => 'url_site_default',
403 'url_api_default' => 'url_api_default',
404 'url_recur_default' => 'url_recur_default',
405 'url_button_default' => 'url_button_default',
406 'url_site_test_default' => 'url_site_test_default',
407 'url_api_test_default' => 'url_api_test_default',
408 'url_recur_test_default' => 'url_recur_test_default',
409 'url_button_test_default' => 'url_button_test_default',
410 'billing_mode' => 'billing_mode',
411 'is_recur' => 'is_recur',
412 'payment_type' => 'payment_type',
413 );
414 }
415 return self::$_fieldKeys;
416 }
417 /**
418 * Returns the names of this table
419 *
420 * @return string
421 */
422 static function getTableName() {
423 return self::$_tableName;
424 }
425 /**
426 * Returns if this table needs to be logged
427 *
428 * @return boolean
429 */
430 function getLog() {
431 return self::$_log;
432 }
433 /**
434 * Returns the list of fields that can be imported
435 *
436 * @param bool $prefix
437 *
438 * @return array
439 */
440 static function &import($prefix = false) {
441 if (!(self::$_import)) {
442 self::$_import = array();
443 $fields = self::fields();
444 foreach($fields as $name => $field) {
445 if (CRM_Utils_Array::value('import', $field)) {
446 if ($prefix) {
447 self::$_import['payment_processor_type'] = & $fields[$name];
448 } else {
449 self::$_import[$name] = & $fields[$name];
450 }
451 }
452 }
453 }
454 return self::$_import;
455 }
456 /**
457 * Returns the list of fields that can be exported
458 *
459 * @param bool $prefix
460 *
461 * @return array
462 */
463 static function &export($prefix = false) {
464 if (!(self::$_export)) {
465 self::$_export = array();
466 $fields = self::fields();
467 foreach($fields as $name => $field) {
468 if (CRM_Utils_Array::value('export', $field)) {
469 if ($prefix) {
470 self::$_export['payment_processor_type'] = & $fields[$name];
471 } else {
472 self::$_export[$name] = & $fields[$name];
473 }
474 }
475 }
476 }
477 return self::$_export;
478 }
479 }