/**
  *  Static Constructor
  *
  *  @param \Faker\Project the DI container
  *  @param string $name of the entity
  *  @param \Faker\Locale\LocaleInterface $locale to use
  *  @param \PHPStats\Generator\GeneratorInterface $util
  *  @return \Faker\Components\Engine\Entity\Builder\EntityGenerator
  */
 public static function create(Project $container, $name, LocaleInterface $locale = null, Utilities $util = null, GeneratorInterface $gen = null)
 {
     $repo = $container->getEngineTypeRepository();
     $event = $container->getEventDispatcher();
     $conn = $container->getGeneratorDatabase();
     $loader = $container->getTemplatingManager()->getLoader();
     if ($locale === null) {
         $locale = $container->getLocaleFactory()->create('en');
     }
     if ($util === null) {
         $util = $container->getEngineUtilities();
     }
     if ($gen === null) {
         $gen = $container->getDefaultRandom();
     }
     return new self($name, $event, $repo, $locale, $util, $gen, $conn, $loader);
 }