PHP code example of benkle / doctrine-adoption
1. Go to this page and download the library: Download benkle/doctrine-adoption 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/ */
benkle / doctrine-adoption example snippets
$collector = new Benkle\DoctrineAdoption\Collector();
$collector->addAdoptee(ParentEntity::class, ChildEntity::class, 'child');
$eventManager = new EventManager();
$eventManager->addEventListener([Events::loadClassMetadata], new Benkle\DoctrineAdoption\MetadataListener($collector));
$entityManager = EntityManager::create($dbOpts, $config, $eventManager);