private function resolveEntityMapping(
        ContainerBuilder $container,
        string $entityManagerName,
        string $entityNamespace,
        string $entityMappingFilePath,
        $enable = true
    ) : ? EntityMapping {
        $enableEntityMapping = $this->resolveParameterName(
            $container,
            $enable
        );

        if (false === $enableEntityMapping) {
            return null;
        }

        $entityNamespace = $this->resolveParameterName($container, $entityNamespace);

        if (!class_exists($entityNamespace)) {
            throw new ConfigurationInvalidException('Entity ' . $entityNamespace . ' not found');
        }

        $entityMappingFilePath = $this->resolveParameterName($container, $entityMappingFilePath);
        $entityManagerName = $this->resolveParameterName($container, $entityManagerName);
        $this->resolveEntityManagerName($container, $entityManagerName);

        return new EntityMapping(
            $entityNamespace,
            $entityMappingFilePath,
            $entityManagerName
        );
    }
private function resolveEntityMapping(
        ContainerBuilder $container,
        string $entityManagerName,
        string $entityNamespace,
        string $entityMappingFilePath,
        $enable = true
    ) : ? EntityMapping {
        $enableEntityMapping = $this->resolveParameterName(
            $container,
            $enable
        );

        if (false === $enableEntityMapping) {
            return null;
        }

        $entityNamespace = $this->resolveParameterName($container, $entityNamespace);

        if (!class_exists($entityNamespace)) {
            throw new ConfigurationInvalidException('Entity ' . $entityNamespace . ' not found');
        }

        $entityMappingFilePath = $this->resolveParameterName($container, $entityMappingFilePath);
        $entityManagerName = $this->resolveParameterName($container, $entityManagerName);
        $this->resolveEntityManagerName($container, $entityManagerName);

        return new EntityMapping(
            $entityNamespace,
            $entityMappingFilePath,
            $entityManagerName
        );
    }
private function resolveEntityMapping ( ContainerBuilder $ container , string $ entityManagerName , string $ entityNamespace , string $ entityMappingFilePath , $ enable = true ) : ? EntityMapping { $ enableEntityMapping = $ this -> resolveParameterName ( $ container , $ enable ) ; if ( false === $ enableEntityMapping ) { return null ; } $ entityNamespace = $ this -> resolveParameterName ( $ container , $ entityNamespace ) ; if ( ! class_exists ( $ entityNamespace ) ) { throw new ConfigurationInvalidException ( 'Entity ' . $ entityNamespace . ' not found' ) ; } $ entityMappingFilePath = $ this -> resolveParameterName ( $ container , $ entityMappingFilePath ) ; $ entityManagerName = $ this -> resolveParameterName ( $ container , $ entityManagerName ) ; $ this -> resolveEntityManagerName ( $ container , $ entityManagerName ) ; return new EntityMapping ( $ entityNamespace , $ entityMappingFilePath , $ entityManagerName ) ; }
Resolve EntityMapping inputs and build a consistent EntityMapping object.

This method returns null if the current entity has not been added

@param ContainerBuilder $container
@param string           $entityManagerName
@param string           $entityNamespace
@param string           $entityMappingFilePath
@param string|bool      $enable

@return EntityMapping|null

@throws ConfigurationInvalidException  Configuration invalid
@throws EntityManagerNotFoundException Entity Manager not found
Resolve EntityMapping inputs and build a consistent EntityMapping object .