PHP code example of tarifhaus / doctrine-nullable-embeddable
1. Go to this page and download the library: Download tarifhaus/doctrine-nullable-embeddable 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/ */
tarifhaus / doctrine-nullable-embeddable example snippets
use Tarifhaus\Doctrine\ORM\NullableEmbeddableListenerFactory;
$listener = NullableEmbeddableListenerFactory::createWithClosureNullator();
$listener->addMapping('App\Domain\User\Model\UserProfile', 'address');
use Doctrine\Common\EventManager;
use Doctrine\ORM\Events;
use Tarifhaus\Doctrine\ORM\NullableEmbeddableListenerFactory;
$listener = NullableEmbeddableListenerFactory::createWithClosureNullator();
$listener->addMapping('App\Domain\User\Model\UserProfile', 'address');
$evm = new EventManager();
$evm->addEventListener([Events::postLoad], $listener);