Untitled diff
31 लाइनें
protected function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)
protected function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)
{
{
$a = new \Doctrine\ORM\Configuration();
$a = ($this->services['doctrine.dbal.default_connection'] ?? $this->getDoctrine_Dbal_DefaultConnectionService());
$b = new \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain();
$c = new \Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver(array(($this->targetDirs[0].'/msgphp/doctrine-mapping') => 'MsgPhp'));
$c->setGlobalBasename('mapping');
$b->addDriver($c, 'MsgPhp');
$b->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver(($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService()), array(0 => '/app/src/Entity')), 'App\\Entity');
$a->setEntityNamespaces(array('msgphp' => 'MsgPhp', 'App' => 'App\\Entity'));
$a->setMetadataCacheImpl(($this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] ?? $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()));
$a->setQueryCacheImpl(($this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] ?? $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()));
$a->setResultCacheImpl(($this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] ?? $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()));
$a->setMetadataDriverImpl($b);
$a->setProxyDir(($this->targetDirs[0].'/doctrine/orm/Proxies'));
$a->setProxyNamespace('Proxies');
$a->setAutoGenerateProxyClasses(true);
$a->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
$a->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
$a->setNamingStrategy(new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy());
$a->setQuoteStrategy(new \Doctrine\ORM\Mapping\DefaultQuoteStrategy());
$a->setEntityListenerResolver(($this->services['doctrine.orm.default_entity_listener_resolver'] ?? $this->getDoctrine_Orm_DefaultEntityListenerResolverService()));
$a->setRepositoryFactory(new \Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory(new \Symfony\Component\DependencyInjection\ServiceLocator(array())));
$a->addCustomHydrationMode('msgphp_scalar', 'MsgPhp\\Domain\\Infra\\Doctrine\\Hydration\\ScalarHydrator');
$a->addCustomHydrationMode('msgphp_single_scalar', 'MsgPhp\\Domain\\Infra\\Doctrine\\Hydration\\SingleScalarHydrator');
$this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create(($this->services['doctrine.dbal.default_connection'] ?? $this->getDoctrine_Dbal_DefaultConnectionService()), $a);
if (isset($this->services['doctrine.orm.default_entity_manager'])) {
return $this->services['doctrine.orm.default_entity_manager'];
}
$b = new \Doctrine\ORM\Configuration();
$this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($a, $b);
$c = new \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain();
$d = new \Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver(array(($this->targetDirs[0].'/msgphp/doctrine-mapping') => 'MsgPhp'));
$d->setGlobalBasename('mapping');
$c->addDriver($d, 'MsgPhp');
$c->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver(($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService()), array(0 => '/app/src/Entity')), 'App\\Entity');
$b->setEntityNamespaces(array('msgphp' => 'MsgPhp', 'App' => 'App\\Entity'));
$b->setMetadataCacheImpl(($this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] ?? $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()));
$b->setQueryCacheImpl(($this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] ?? $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()));
$b->setResultCacheImpl(($this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] ?? $this->getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()));
$b->setMetadataDriverImpl($c);
$b->setProxyDir(($this->targetDirs[0].'/doctrine/orm/Proxies'));
$b->setProxyNamespace('Proxies');
$b->setAutoGenerateProxyClasses(true);
$b->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
$b->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
$b->setNamingStrategy(new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy());
$b->setQuoteStrategy(new \Doctrine\ORM\Mapping\DefaultQuoteStrategy());
$b->setEntityListenerResolver(($this->services['doctrine.orm.default_entity_listener_resolver'] ?? $this->getDoctrine_Orm_DefaultEntityListenerResolverService()));
$b->setRepositoryFactory(new \Doctrine\Bundle\DoctrineBundle\Repository\ContainerRepositoryFactory(new \Symfony\Component\DependencyInjection\ServiceLocator(array())));
$b->addCustomHydrationMode('msgphp_scalar', 'MsgPhp\\Domain\\Infra\\Doctrine\\Hydration\\ScalarHydrator');
$b->addCustomHydrationMode('msgphp_single_scalar', 'MsgPhp\\Domain\\Infra\\Doctrine\\Hydration\\SingleScalarHydrator');
(new \Doctrine\Bundle\DoctrineBundle\ManagerConfigurator(array(), array()))->configure($instance);
(new \Doctrine\Bundle\DoctrineBundle\ManagerConfigurator(array(), array()))->configure($instance);
return $instance;
return $instance;
}
}