X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FMigrate%2FImportJSON.php;h=2de4dced64eb0ad381fd735f9754d573fd532293;hb=c52174d854bcc01af1e112d3bb0eee0e201d65e6;hp=bc25abc161c493f6156841ba515a4a6d972dc369;hpb=5b8739fa11c572c4a3556601cbb7ddb7695bea94;p=civicrm-core.git diff --git a/CRM/Utils/Migrate/ImportJSON.php b/CRM/Utils/Migrate/ImportJSON.php index bc25abc161..2de4dced64 100644 --- a/CRM/Utils/Migrate/ImportJSON.php +++ b/CRM/Utils/Migrate/ImportJSON.php @@ -1,9 +1,9 @@ _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;