<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Contact_Import_Field {
/**#@+
- * @access protected
* @var string
*/
/**
- * name of the field
+ * Name of the field
*/
public $_name;
/**
- * title of the field to be used in display
+ * Title of the field to be used in display
*/
public $_title;
/**
- * type of field
+ * Type of field
* @var enum
*/
public $_type;
/**
- * is this field required
+ * Is this field required
* @var boolean
*/
public $_required;
/**
- * data to be carried for use by a derived class
+ * Data to be carried for use by a derived class
* @var object
*/
public $_payload;
/**
- * regexp to match the CSV header of this column/field
+ * Regexp to match the CSV header of this column/field
* @var string
*/
public $_columnPattern;
/**
- * regexp to match the pattern of data from various column/fields
+ * Regexp to match the pattern of data from various column/fields
* @var string
*/
public $_dataPattern;
/**
- * regexp to match the pattern of header from various column/fields
+ * Regexp to match the pattern of header from various column/fields
* @var string
*/
public $_headerPattern;
/**
- * location type
+ * Location type
* @var int
*/
public $_hasLocationType;
/**
- * does this field have a phone type
+ * Does this field have a phone type
* @var string
*/
public $_phoneType;
/**
- * value of this field
+ * Value of this field
* @var object
*/
public $_value;
/**
- * does this field have a relationship info
+ * Does this field have a relationship info
* @var string
*/
public $_related;
/**
- * does this field have a relationship Contact Type
+ * Does this field have a relationship Contact Type
* @var string
*/
public $_relatedContactType;
/**
- * does this field have a relationship Contact Details
+ * Does this field have a relationship Contact Details
* @var string
*/
public $_relatedContactDetails;
/**
- * does this field have a related Contact info of Location Type
+ * Does this field have a related Contact info of Location Type
* @var int
*/
public $_relatedContactLocType;
/**
- * does this field have a related Contact info of Phone Type
+ * Does this field have a related Contact info of Phone Type
* @var string
*/
public $_relatedContactPhoneType;
/**
- * @param $name
+ * @param string $name
* @param $title
* @param int $type
* @param string $columnPattern
* @param null $relatedContactLocType
* @param null $relatedContactPhoneType
*/
- function __construct($name, $title, $type = CRM_Utils_Type::T_INT, $columnPattern = '//', $dataPattern = '//', $hasLocationType = NULL, $phoneType = NULL, $related = NULL, $relatedContactType = NULL, $relatedContactDetails = NULL, $relatedContactLocType = NULL, $relatedContactPhoneType = NULL) {
+ public function __construct($name, $title, $type = CRM_Utils_Type::T_INT, $columnPattern = '//', $dataPattern = '//', $hasLocationType = NULL, $phoneType = NULL, $related = NULL, $relatedContactType = NULL, $relatedContactDetails = NULL, $relatedContactLocType = NULL, $relatedContactPhoneType = NULL) {
$this->_name = $name;
$this->_title = $title;
$this->_type = $type;
$this->_value = NULL;
}
- function resetValue() {
+ public function resetValue() {
$this->_value = NULL;
}
/**
- * the value is in string format. convert the value to the type of this field
+ * The value is in string format. convert the value to the type of this field
* and set the field value with the appropriate type
*/
- function setValue($value) {
+ public function setValue($value) {
$this->_value = $value;
}
/**
* @return bool
*/
- function validate() {
+ public function validate() {
// echo $this->_value."===========<br>";
$message = '';
}
}
}
-