public function getEntityAlias()
    {
        if (!$this->entityAlias) {
            $className       = $this->getClassName();
            $reflectionCLass = new ReflectionClass($className);

            if (is_string($reflectionCLass->getConstant('ALIAS_NAME'))) {
                $entityAlias = $reflectionCLass->getConstant('ALIAS_NAME');
            } else {
                $entityAlias = array_slice(explode('\\', $className), -1, 1)[0];
            }

            $this->entityAlias = preg_replace('/[^a-z]/i', '', $entityAlias);
        }

        return $this->entityAlias;
    }
public function getEntityAlias()
    {
        if (!$this->entityAlias) {
            $className       = $this->getClassName();
            $reflectionCLass = new ReflectionClass($className);

            if (is_string($reflectionCLass->getConstant('ALIAS_NAME'))) {
                $entityAlias = $reflectionCLass->getConstant('ALIAS_NAME');
            } else {
                $entityAlias = array_slice(explode('\\', $className), -1, 1)[0];
            }

            $this->entityAlias = preg_replace('/[^a-z]/i', '', $entityAlias);
        }

        return $this->entityAlias;
    }
public function getEntityAlias ( ) { if ( ! $ this -> entityAlias ) { $ className = $ this -> getClassName ( ) ; $ reflectionCLass = new ReflectionClass ( $ className ) ; if ( is_string ( $ reflectionCLass -> getConstant ( 'ALIAS_NAME' ) ) ) { $ entityAlias = $ reflectionCLass -> getConstant ( 'ALIAS_NAME' ) ; } else { $ entityAlias = array_slice ( explode ( '\\' , $ className ) , - 1 , 1 ) [ 0 ] ; } $ this -> entityAlias = preg_replace ( '/[^a-z]/i' , '' , $ entityAlias ) ; } return $ this -> entityAlias ; }
Get related entity alias used in query. Will be used entity class name without namespace.

@return string
@throws \ReflectionException
Get related entity alias used in query . Will be used entity class name without namespace .