PHP code example of wabel / zoho-crm-copy-db

1. Go to this page and download the library: Download wabel/zoho-crm-copy-db library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wabel / zoho-crm-copy-db example snippets


// $connection is a Doctrine DBAL connection to your database.
$databaseCopier = new ZohoDatabaseCopier($connection);

// $contactZohoDao is the Zoho Dao to the module you want to copy.
$databaseCopier->fetchFromZoho($contactZohoDao);

// Generated database table will be prefixed with "my_prefix_"
$databaseCopier = new ZohoDatabaseCopier($connection, "my_prefix_");

// Pass false as second parameter to force copying everything rather than doing an incremental copy.
$databaseCopier->fetchFromZoho($contactZohoDao, false);

// $connection is a Doctrine DBAL connection to your database.
$databaseCopier = new ZohoDatabaseCopier($connection);



// $connection is a Doctrine DBAL connection to your database.
$databaseSync = new ZohoDatabasePusher($connection);

// $contactZohoDao is the Zoho Dao to the module you want to push.
$databaseSync->pushToZoho($contactZohoDao);

$listener = new MyListener();
$databaseCopier = new ZohoDatabaseCopier($connection, "my_prefix_", [ $listener ]);