PHP code example of relaxedws / replicator
1. Go to this page and download the library: Download relaxedws/replicator 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/ */
relaxedws / replicator example snippets
use Doctrine\CouchDB\CouchDBClient;
use Relaxed\Replicator\ReplicationTask;
use Relaxed\Replicator\Replicator;
$source = CouchDBClient::create(['dbname' => 'source']);
$target = CouchDBClient::create(['dbname' => 'target']);
$task = new ReplicationTask();
$replicator = new Replicator($source, $target, $task);
$response = $replicator->startReplication();