src/EntityManager.php
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;
    }
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;
    }
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 ; }
Retorna \Doctrine\ORM\EntityManager

@return Em
Retorna \ Doctrine \ ORM \ EntityManager