Looks up the original class name from the alias map

@param string $aliasOrClassName
@return string|NULL NULL if no alias mapping is found or the original class name as string
508173
protected function getOriginalClassName($aliasOrClassName)
    {
        // Is an original class which has an alias
        if (array_key_exists($aliasOrClassName, $this->aliasMap['classNameToAliasMapping'])) {
            return $aliasOrClassName;
        }

        // Is an alias (we're graceful regarding casing for alias definitions)
        $lowerCasedClassName = strtolower($aliasOrClassName);
        if (array_key_exists($lowerCasedClassName, $this->aliasMap['aliasToClassNameMapping'])) {
            return $this->aliasMap['aliasToClassNameMapping'][$lowerCasedClassName];
        }
        // No alias registered for this class name, return and remember that info
        return $this->aliasMap['classNameToAliasMapping'][$aliasOrClassName] = NULL;
    }
1277005
public function getAlias($name)
        {
            if (isset($this->_aliases[$name])) {
                return $this->_aliases[$name];
            }

            return null;
        }
394614
public function getFilterClassName($name)
    {
        return isset($this->odmOptions['filters'][$name])
            ? $this->odmOptions['filters'][$name]['class']
            : null;
    }
700519
public static function oldClassName($className)
    {
        // If class name has first symbol as NS_SEPARATOR - remove it to avoid ugly classes _samson_core_...
        if ($className{0} == self::NS_SEPARATOR) {
            $className = substr($className, 1);
        }

        // Convert NS_SEPARATOR to namespace
        return strtolower(str_replace(self::NS_SEPARATOR, '_', $className));
    }
1273501
protected function getNamespaceName($className = null)
    {
        $parts = explode('\\', $className ?: $this->className);
        array_pop($parts);

        return implode('\\', $parts);
    }
302743
public function getAliasForClassname(Classname $class)
    {
        foreach ($this->classnames as $c) {
            if ($c['classname']->equals($class)) {
                return str_replace('\\', '_', ltrim($class->classname, '\\'));
            }
        }

        return str_replace('\\', '_', ltrim($class->classname, '\\'));
    }
1261955
public function alias($alias = null)
    {
        deprecationWarning(
            get_called_class() . '::alias() is deprecated. ' .
            'Use setAlias()/getAlias() instead.'
        );
        if ($alias !== null) {
            $this->setAlias($alias);
        }

        return $this->getAlias();
    }
905252
protected function _getItemClassName($plugin, $aliasClass)
    {
        if ($plugin === null) {
            $plugin = 'Core';
        }

        $buttonClass = $plugin . '.' . self::CLASS_NAME_PREFIX . $aliasClass;
        $className   = App::className($buttonClass, self::CLASS_TYPE);

        if ($className === false) {
            $buttonClass = self::CLASS_NAME_PREFIX . $aliasClass;
            $className   = App::className($buttonClass, self::CLASS_TYPE);
        }

        return $className;
    }
1341405
public function classname($classname = null)
    {
        if ($classname === null) {
            return $this->classname;
        }

        $this->classname = $classname;
    }
712961
public function resolveClassAlias($alias)
    {
        $alias = static::normalise($alias);

        if (isset($this->classAliases[$alias])) {
            return $this->classAliases[$alias];
        }

        return $alias;
    }
1142745
public function createClassChain($className, $classAlias = null)
    {
        if (!$classAlias) {
            $classAlias = $className;
        }
        $activeChain = $this->getActiveChain($className, $classAlias);
        if (!empty($activeChain)) {
            $className = $this->createClassExtensions($activeChain, $classAlias);
        }

        return $className;
    }
988410
public function getMetadataFor($className)
    {
        if ( ! isset($this->loadedMetadata[$className])) {
//            print_r('loading class ' . $className . "\n");
            $realClassName = $className;

            // Check for namespace alias
            if (strpos($className, ':') !== false) {
                list($namespaceAlias, $simpleClassName) = explode(':', $className);
                $realClassName = $this->configuration->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;

                if (isset($this->loadedMetadata[$realClassName])) {
                    // We do not have the alias name in the map, include it
                    $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];

                    return $this->loadedMetadata[$realClassName];
                }
            }

            if ($this->cacheDriver) {
                if (($cached = $this->cacheDriver->fetch("$realClassName\$XMLCLASSMETADATA")) !== false) {
                    $this->loadedMetadata[$realClassName] = $cached;
                    if (!$cached->isMappedSuperclass) {
                        $this->xmlToClassMap[$cached->getXmlName()] = $realClassName;
                    }
                } else {
                    foreach ($this->loadMetadata($realClassName) as $loadedClassName) {
                        $this->cacheDriver->save(
                            "$loadedClassName\$XMLCLASSMETADATA", $this->loadedMetadata[$loadedClassName], null
                        );
                    }
                }
            } else {
                $this->loadMetadata($realClassName);
            }

            if ($className != $realClassName) {
                // We do not have the alias name in the map, include it
                $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
            }
        }

        return $this->loadedMetadata[$className];
    }
79300
public function getProxyClassName($className)
    {
        $suffix = ltrim($className, '\\');
        
        if ($this->proxyClassSuffix !== null) {
            $suffix .= $this->proxyClassSuffix;    
        }
        
        return rtrim($this->proxyNamespace, '\\') . '\\'.self::MARKER.'\\' . $suffix;
    }
563857
public function getMappingByAlias(string $alias) : Mapping
    {
        foreach ($this->mappings as $mapping) {
            if (0 === strcasecmp($alias, $mapping->getClassAlias())) {
                return $mapping;
            }
        }

        return Mapping::null();
    }
577160
public function getProxyNamespace($className)
    {
        $proxyClassName = $this->getProxyClassName($className);
        $parts = explode('\\', strrev($proxyClassName), 2);
    
        return strrev($parts[1]);
    }
231104
public function getMappingByClassName(string $className) : Mapping
    {
        $className = ltrim($className, '\\');

        return (!empty($this->mappings[$className])) ? $this->mappings[$className] : Mapping::null();
    }
1275663
public function getTagByClassName($className)
    {
        if (is_object($className)) $className = get_class($className);
        if (isset($this->known[$className]['tagName'])) {
            return $this->known[$className]['tagName'];
        } else {
            return null;
        }
    }