public function build($aConnection, array $mappingsPaths = [], $isDevMode = true)
    {
        if (empty($mappingsPaths)) {
            $mappingsPaths = [__DIR__ . '/Mapping'];
        }

        Type::addType('user_id', UserIdType::class);
        Type::addType('user_roles', UserRolesType::class);

        return EntityManager::create(
            $aConnection,
            Setup::createYAMLMetadataConfiguration($mappingsPaths, $isDevMode)
        );
    }
public function build($aConnection, array $mappingsPaths = [], $isDevMode = true)
    {
        if (empty($mappingsPaths)) {
            $mappingsPaths = [__DIR__ . '/Mapping'];
        }

        Type::addType('user_id', UserIdType::class);
        Type::addType('user_roles', UserRolesType::class);

        return EntityManager::create(
            $aConnection,
            Setup::createYAMLMetadataConfiguration($mappingsPaths, $isDevMode)
        );
    }
public function build ( $ aConnection , array $ mappingsPaths = [ ] , $ isDevMode = true ) { if ( empty ( $ mappingsPaths ) ) { $ mappingsPaths = [ __DIR__ . '/Mapping' ] ; } Type :: addType ( 'user_id' , UserIdType :: class ) ; Type :: addType ( 'user_roles' , UserRolesType :: class ) ; return EntityManager :: create ( $ aConnection , Setup :: createYAMLMetadataConfiguration ( $ mappingsPaths , $ isDevMode ) ) ; }
Creates an entity manager instance enabling mappings and custom types.

@param mixed $aConnection   Connection parameters as db driver
@param array $mappingsPaths The mapping files diretory paths
@param bool  $isDevMode     Enables the dev mode, by default is enabled

@return EntityManager
Creates an entity manager instance enabling mappings and custom types .