Merge pull request #4375 from totten/master-mysqli-compat
[civicrm-core.git] / CRM / Utils / Migrate / ImportJSON.php
index 09ac0946113201ee92b76ed890cfed7907e6ebd2..2de4dced64eb0ad381fd735f9754d573fd532293 100644 (file)
@@ -38,11 +38,17 @@ class CRM_Utils_Migrate_ImportJSON {
 
   protected $_saveMapping;
 
+  /**
+   *
+   */
   function __construct() {
     $this->_lookupCache = array();
     $this->_saveMapping = array();
   }
 
+  /**
+   * @param $file
+   */
   function run($file) {
     $json = file_get_contents($file);
 
@@ -69,6 +75,9 @@ class CRM_Utils_Migrate_ImportJSON {
     CRM_Core_Config::clearDBCache();
   }
 
+  /**
+   * @param $contact
+   */
   function contact(&$contact) {
     $this->restore($contact,
       'CRM_Contact_DAO_Contact',
@@ -77,6 +86,9 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $email
+   */
   function email(&$email) {
     $this->restore($email,
       'CRM_Core_DAO_Email',
@@ -84,6 +96,9 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $phone
+   */
   function phone(&$phone) {
     $this->restore($phone,
       'CRM_Core_DAO_Phone',
@@ -91,6 +106,9 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $address
+   */
   function address(&$address) {
     $this->restore($address,
       'CRM_Core_DAO_Address',
@@ -98,6 +116,9 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $note
+   */
   function note(&$note) {
     $this->restore($note,
       'CRM_Core_DAO_Note',
@@ -106,6 +127,9 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $relationship
+   */
   function relationship(&$relationship) {
     $this->restore($relationship,
       'CRM_Contact_DAO_Relationship',
@@ -116,6 +140,10 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $activity
+   * @param $activityContacts
+   */
   function activity($activity, $activityContacts) {
     $this->restore($activity,
       'CRM_Activity_DAO_Activity',
@@ -132,6 +160,10 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $group
+   * @param $groupContact
+   */
   function group($group, $groupContact) {
     $this->restore($group,
       'CRM_Contact_DAO_Group',
@@ -148,6 +180,10 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $tag
+   * @param $entityTag
+   */
   function tag($tag, $entityTag) {
     $this->restore($tag,
       'CRM_Core_DAO_Tag',
@@ -166,6 +202,12 @@ class CRM_Utils_Migrate_ImportJSON {
     );
   }
 
+  /**
+   * @param $chunk
+   * @param string $daoName
+   * @param null $lookUpMapping
+   * @param null $dateFields
+   */
   function restore(&$chunk, $daoName, $lookUpMapping = NULL, $dateFields = NULL) {
     $object   = new $daoName();
     $tableName = $object->__table;
@@ -237,6 +279,9 @@ class CRM_Utils_Migrate_ImportJSON {
     }
   }
 
+  /**
+   * @param string $tableName
+   */
   function populateCache($tableName) {
     if (isset($this->_lookupCache[$tableName])) {
       return;