PHP code example of jojo1981 / data-resolver-handlers
1. Go to this page and download the library: Download jojo1981/data-resolver-handlers 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/ */
jojo1981 / data-resolver-handlers example snippets
t factory and register handlers
$factory = (new \Jojo1981\DataResolver\Factory())
->useDefaultSequenceHandlers()
->registerSequenceHandler(new \Jojo1981\DataResolverHandlers\DoctrineCollectionSequenceHandler())
->registerSequenceHandler(new \Jojo1981\DataResolverHandlers\TypedCollectionSequenceHandler())
->setMergeHandler(
new \Jojo1981\DataResolverHandlers\DoctrineCollectionMergeHandlerDecorator(
new \Jojo1981\DataResolverHandlers\TypedCollectionMergeHandlerDecorator(
new \Jojo1981\DataResolver\Handler\MergeHandler\DefaultMergeHandler()
)
)
);
// get resolver builder factory
$resolverBuilderFactory = $factory->getResolverBuilderFactory();
// and you're ready to go