Create's and return's a new Doctrine ORM configuration instance.

@return \Doctrine\ORM\Configuration The configuration instance
436895
protected function createConfiguration()
    {

        // load the persistence unit configuration
        $persistenceUnitNode = $this->getPersistenceUnitNode();

        // load the metadata configuration
        $metadataConfiguration = $persistenceUnitNode->getMetadataConfiguration();

        // prepare the setup properties
        $absolutePaths = $metadataConfiguration->getDirectoriesAsArray();
        $proxyDir = $metadataConfiguration->getParam(MetadataConfigurationInterface::PARAM_PROXY_DIR);
        $proxyNamespace = $metadataConfiguration->getParam(MetadataConfigurationInterface::PARAM_PROXY_NAMESPACE);
        $autoGenerateProxyClasses = $metadataConfiguration->getParam(MetadataConfigurationInterface::PARAM_AUTO_GENERATE_PROXY_CLASSES);
        $useSimpleAnnotationReader = $metadataConfiguration->getParam(MetadataConfigurationInterface::PARAM_USE_SIMPLE_ANNOTATION_READER);

        // load the metadata driver factory class name
        $metadataDriverFactory = $metadataConfiguration->getFactory();

        // initialize the params to be passed to the factory
        $metadataDriverParams = array(DriverKeys::USE_SIMPLE_ANNOTATION_READER => $useSimpleAnnotationReader);

        // create the Doctrine ORM configuration
        $configuration = new Configuration();
        $configuration->setMetadataDriverImpl($metadataDriverFactory::get($configuration, $absolutePaths, $metadataDriverParams));

        // initialize the metadata cache configuration
        $metadataCacheConfiguration = $persistenceUnitNode->getMetadataCacheConfiguration();
        $configuration->setMetadataCacheImpl($this->getCacheImpl($metadataCacheConfiguration));

        // initialize the query cache configuration
        $queryCacheConfiguration = $persistenceUnitNode->getQueryCacheConfiguration();
        $configuration->setQueryCacheImpl($this->getCacheImpl($queryCacheConfiguration));

        // initialize the result cache configuration
        $resultCacheConfiguration = $persistenceUnitNode->getResultCacheConfiguration();
        $configuration->setResultCacheImpl($this->getCacheImpl($resultCacheConfiguration));

        // proxy configuration
        $configuration->setProxyDir($proxyDir = $proxyDir ?: sys_get_temp_dir());
        $configuration->setProxyNamespace($proxyNamespace = $proxyNamespace ?: 'Doctrine\Proxy');
        $configuration->setAutoGenerateProxyClasses($autoGenerateProxyClasses = $autoGenerateProxyClasses ?: true);

        // repository configuration
        $configuration->setDefaultRepositoryClassName($persistenceUnitNode->getDefaultRepositoryClassName());
        $configuration->setRepositoryFactory($this->getApplication()->search($persistenceUnitNode->getRepositoryFactory()));

        // return the configuration instance
        return $configuration;
    }
529093
public function create()
    {
        /**
         * @var StateLine $stateLine
         */
        $classNamespace = $this->getEntityNamespace();
        $stateLine = new $classNamespace();
        $stateLine->setCreatedAt($this->now());

        return $stateLine;
    }
676030
public static function newInstance()
    {
        $config = self::create();

        $config->username = 'null';
        $config->password = 'null';
        $config->credentials = ['null', 'null'];
        $config->bindtoInterface = 'null';
        $config->timeout = 5;

        return $config;
    }
621498
public function create(): Model
	{
		$model_class = $this->getModelClass();
		$instance = new $model_class;
		$this->fill($instance);

		return $instance;
	}
500616
public function create(): ConfigurationInterface
    {
        $config = $this->detectConfig();
        $config->set('env', $this->environment);

        return $config;
    }
37553
public function create()
    {
        /**
         * @var OrderLine $orderLine
         */
        $classNamespace = $this->getEntityNamespace();
        $orderLine = new $classNamespace();

        $orderLine
            ->setWidth(0)
            ->setHeight(0)
            ->setWidth(0)
            ->setWeight(0)
            ->setAmount($this->createZeroAmountMoney())
            ->setPurchasableAmount($this->createZeroAmountMoney());

        return $orderLine;
    }
247429
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('stof_doctrine_extensions');
        if (\method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->getRootNode();
        } else {
            // BC layer for symfony/config 4.1 and older
            $rootNode = $treeBuilder->root('stof_doctrine_extensions');
        }

        $rootNode
            ->append($this->getVendorNode('orm'))
            ->append($this->getVendorNode('mongodb'))
            ->append($this->getClassNode())
            ->append($this->getUploadableNode())
            ->children()
                ->scalarNode('default_locale')
                    ->cannotBeEmpty()
                    ->defaultValue('en')
                ->end()
                ->booleanNode('translation_fallback')->defaultFalse()->end()
                ->booleanNode('persist_default_translation')->defaultFalse()->end()
                ->booleanNode('skip_translation_on_load')->defaultFalse()->end()
            ->end()
        ;

        return $treeBuilder;
    }
29776
public function create()
    {
        $instance = self::createRefundTransaction($this);
        $this->setId($instance->getId());
        return $instance;
    }
343672
public function create()
    {
        $instance = self::createOrder($this);
        $this->setId($instance->getId());
        return $instance;
    }
260644
public function create()
    {
        $instance = self::createBrand($this);
        $this->setId($instance->getId());
        return $instance;
    }
554086
public function create()
    {
        $instance = self::createStoreCredit($this);
        $this->setId($instance->getId());
        return $instance;
    }
645219
public function create()
    {
        /**
         * @var Category $category
         */
        $classNamespace = $this->getEntityNamespace();
        $category = new $classNamespace();
        $category
            ->setSubcategories(new ArrayCollection())
            ->setRoot(true)
            ->setPosition(0)
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $category;
    }
597552
protected function bindEntities()
    {
        $entities = $this->app->config['entity'];

        foreach($entities as $e => $config){

            $this->app->bind("entity.$e", function ($app, $default) use ($config){

                return new $config['class'];

            });
        }
    }
1036785
public static function get_instance() {

        if (self::$_entityManager === null) {
            self::initConfig();
            //setando as configurações definidas anteriormente
            $config = Setup::createAnnotationMetadataConfiguration(self::$settings['entidades'], self::$settings['isDevMod']);
            $config->addCustomStringFunction('group_concat', 'Oro\ORM\Query\AST\Functions\String\GroupConcat');
            $config->addCustomNumericFunction('hour', 'Oro\ORM\Query\AST\Functions\SimpleFunction');
            $config->addCustomNumericFunction('timestampdiff', 'Oro\ORM\Query\AST\Functions\Numeric\TimestampDiff');
            $config->addCustomDatetimeFunction('date', 'Oro\ORM\Query\AST\Functions\SimpleFunction');
            //criando o Entity Manager com base nas configurações de dev e banco de dados
            self::$_entityManager = Em::create(self::$settings['dbParams'], $config);
        }

        return self::$_entityManager;
    }
676391
public function create()
    {
        /**
         * @var Zone $zone
         */
        $classNamespace = $this->getEntityNamespace();
        $zone = new $classNamespace();
        $zone
            ->setLocations([])
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $zone;
    }
949734
public function create()
    {
        /**
         * @var Menu $menu
         */
        $classNamespace = $this->getEntityNamespace();
        $menu = new $classNamespace();
        $menu
            ->setDescription('')
            ->setSubnodes(new ArrayCollection())
            ->setEnabled(false);

        return $menu;
    }
1219601
public function create()
    {
        $sm = $this->em->getConnection()->getSchemaManager();
        $table = $this->em->getClassMetadata(self::$entityName)->getTableName();

        return $sm->tablesExist(array($table));
    }