PHP code example of webfactory / content-mapping-destinationadapter-solarium

1. Go to this page and download the library: Download webfactory/content-mapping-destinationadapter-solarium 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/ */

    

webfactory / content-mapping-destinationadapter-solarium example snippets


use Solarium\Client;
use Webfactory\ContentMapping\Synchronizer;
use Webfactory\ContentMapping\Solr\SolariumDestinationAdapter;

$solrClient = new Client($configArray); // see Solarium documentation for details

$synchronizer = new Synchronizer($sourceAdapter, $mapper, new SolariumDestinationAdapter($solrClient));