webfactory/content-mapping-sourceadapter-doctrine

SourceAdapter for Doctrine entities inside the webfactory/content-mapping mini framework

1.2.0 2021-07-09 07:25 UTC

This package is auto-updated.

Last update: 2024-06-09 13:31:08 UTC


README

SourceAdapter for Doctrine entities in the webfactory/content-mapping mini framework.

Installation

composer require webfactory/content-mapping-sourceadapter-doctrine

Usage

use Webfactory\ContentMapping\Synchronizer;
use Webfactory\ContentMapping\SourceAdapter\Doctrine\GenericDoctrineSourceAdapter;

$repository = ...; // instance of your entity repository
$repositoryMethod = 'findForSynchronization';

$sourceAdapter = new GenericDoctrineSourceAdapter($repository, $repositoryMethod);

$synchronizer = new Synchronizer($sourceAdapter, $mapper, $destinationAdapter, $logger);

Credits, Copyright and License

This project was started at webfactory GmbH, Bonn.

Copyright 2015-2016 webfactory GmbH, Bonn. Code released under the MIT license.