DependencyInjection/BaseContainerAccessor.php
private function locateEntity($entityAlias)
    {
        if (1 === preg_match('/^.*?\\.entity\\..*?\\.class$/', $entityAlias)) {
            if (self::$container->hasParameter($entityAlias)) {
                return $this->getParameter($entityAlias);
            }
        }

        if (1 === preg_match('/^[^:]+:[^:]+$/', $entityAlias)) {
            $possibleEntityAliasShortMapping = str_replace(':', '.entity.', $entityAlias.'.class');
            if (self::$container->hasParameter($possibleEntityAliasShortMapping)) {
                return $this->getParameter($possibleEntityAliasShortMapping);
            }
        }

        return $entityAlias;
    }
private function locateEntity($entityAlias)
    {
        if (1 === preg_match('/^.*?\\.entity\\..*?\\.class$/', $entityAlias)) {
            if (self::$container->hasParameter($entityAlias)) {
                return $this->getParameter($entityAlias);
            }
        }

        if (1 === preg_match('/^[^:]+:[^:]+$/', $entityAlias)) {
            $possibleEntityAliasShortMapping = str_replace(':', '.entity.', $entityAlias.'.class');
            if (self::$container->hasParameter($possibleEntityAliasShortMapping)) {
                return $this->getParameter($possibleEntityAliasShortMapping);
            }
        }

        return $entityAlias;
    }
private function locateEntity ( $ entityAlias ) { if ( 1 === preg_match ( '/^.*?\\.entity\\..*?\\.class$/' , $ entityAlias ) ) { if ( self :: $ container -> hasParameter ( $ entityAlias ) ) { return $ this -> getParameter ( $ entityAlias ) ; } } if ( 1 === preg_match ( '/^[^:]+:[^:]+$/' , $ entityAlias ) ) { $ possibleEntityAliasShortMapping = str_replace ( ':' , '.entity.' , $ entityAlias . '.class' ) ; if ( self :: $ container -> hasParameter ( $ possibleEntityAliasShortMapping ) ) { return $ this -> getParameter ( $ possibleEntityAliasShortMapping ) ; } } return $ entityAlias ; }
Get entity locator given a string.

Available formats:

MyBundle\Entity\Namespace\User - Namespace
MyBundle:User - Doctrine short alias
my_prefix:user - When using short DoctrineExtraMapping, prefix:name
my_prefix.entity.user.class - When using DoctrineExtraMapping class param

@param string $entityAlias

@return string
Get entity locator given a string .