public function boot()
 {
     $classMap = $this->container->getParameter('doctrine_dto.class_map');
     $mapGeneratorDto = $this->container->getParameter('doctrine_dto.map_generator_dto');
     $mapGeneratorEntity = $this->container->getParameter('doctrine_dto.map_generator_entity');
     $entityDtoMap = new Map();
     foreach ($classMap as $entityPath => $dtoPath) {
         $entityDtoMap->addMapElement($entityPath, $dtoPath);
     }
     foreach ($mapGeneratorDto as $classPath) {
         /** @var MapInterface $classPath */
         $object = new $classPath();
         $entityDtoMap->addMapGeneratorElement($object);
     }
     $dtoEntityMap = $entityDtoMap->getFlippedMap();
     foreach ($mapGeneratorEntity as $classPath) {
         /** @var MapInterface $classPath */
         $object = new $classPath();
         $dtoEntityMap->addMapGeneratorElement($object);
     }
     DtoClassMap::setMap($entityDtoMap, $dtoEntityMap);
 }
 public static function setUpBeforeClass()
 {
     $map = new Map(array(get_class(new UserEntity()) => get_class(new UserDto()), get_class(new PhoneEntity()) => get_class(new PhoneDto()), get_class(new CarEntity()) => get_class(new CarDto())));
     $map->addMapGeneratorElement(new EntityDtoSimpleGenerator());
     DtoClassMap::setMap($map, $map->getFlippedMap());
 }