PHP code example of griiv / synchroengine

1. Go to this page and download the library: Download griiv/synchroengine 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/ */

    

griiv / synchroengine example snippets


namespace Griiv\SynchroEngine\Synchro\Import;

use Griiv\SynchroEngine\Core\ImportBase;

class CustomersImport extends ImportBase
{
    protected function initDataSources()
    {
        // TODO: Implement initDataSources() method.
    }
    
    protected function initItemDefinition()
    {
        // TODO: Implement initItemDefinition() method.
    }
    
    protected function processRow($dataArray)
    {
        // TODO: Implement processRow() method.
    }
}

namespace Griiv\SynchroEngine\Synchro\Export;

use Griiv\SynchroEngine\Core\ExportBase;

class NomDeMonExportExport extends ExportBase
{
    protected function initDataTargets()
    {
        // Définir les cibles de données (fichier, API, ...)
    }

    protected function initTargetItemDefinition()
    {
        // Structure des données attendues par la cible
    }

    protected function initDataSources()
    {
        // Sources à exporter (BDD, API, ...)
    }

    protected function initItemDefinition()
    {
        // Définition des données issues de la source
    }

    protected function processRow($dataArray)
    {
        return parent::processRow($dataArray);
    }
}
bash
php bin/console gsynchro:add-export gsynchro NomDeMonExport