checks of a class exists on the global scope try the namespace.

@param $className

@return string

@throws ClassNotFoundException

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
509790
public static function classExists($className, $namespace)
    {
        if (class_exists($className)) {
            return $className;
        }

        // add namespace
        $className = sprintf('%s%s', static::getFormatNamespace($namespace, true), $className);

        if (class_exists($className)) {
            return $className;
        }

        return false;
    }
969143
public function hasClass($className)
    {
        if ($this->hasAttribute('class')) {
            return in_array($className, preg_split('/\s+/', $this->getAttribute('class')));
        }

        return false;
    }
405715
public static function getClassProfile($classname) {
		if (!is_string($classname) || empty($classname)) {
			throw new \InvalidArgumentException("Argument is not a valid class name");
		}
		
		//check if is already stored
		if (array_key_exists($classname, self::$profiles)) {
			return self::$profiles[$classname];
		}
		
		//validate classname
 		if (!class_exists($classname, true)) {
 			throw new \RuntimeException("Class %s could not be found");
 		}
		
		//build profile and return
		self::$profiles[$classname] = new ClassProfile($classname);
		return self::$profiles[$classname];
	}
406456
public function reflectTrait($className): ReflectionTrait
    {
        $className = ClassName::fromUnknown($className);

        $class = $this->reflectClassLike($className);

        if (false === $class instanceof ReflectionTrait) {
            throw new ClassNotFound(sprintf(
                '"%s" is not a trait, it is a "%s"',
                $className->full(),
                get_class($class)
            ));
        }

        return $class;
    }
625894
final public function hasclass($classname)
    {
        return !!$this->hasattr('class')?in_array($classname, explode(' ', $this->attrs->class)):FALSE;
    }
1230021
public function loadClass($className)
    {
        if (null === $this->_namespace || $this->_namespace.$this->_namespaceSeparator === substr($className, 0, strlen($this->_namespace.$this->_namespaceSeparator))) {
            $fileName = '';
            $namespace = '';
            if (false !== ($lastNsPos = strripos($className, $this->_namespaceSeparator))) {
                $namespace = substr($className, 0, $lastNsPos);
                $className = substr($className, $lastNsPos + 1);
                $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
            }
            $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension;
            $filePath = ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName;

            if (file_exists($filePath)) {
                require $filePath;
            }
        }
    }
28301
public function loadClass($className)
    {
        if ($this->namespace !== null && strpos($className, $this->namespace.$this->namespaceSeparator) !== 0) {
            return false;
        }

        require ($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '')
               . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className)
               . $this->fileExtension;

        return true;
    }
996352
public function loadClass($className)
    {
        $fileName = "";
        if (false !== ($lastNsPos = strripos($className, self::NAMESPACE_SEPARATOR))) {
            $namespace = substr($className, 0, $lastNsPos);
            $className = substr($className, $lastNsPos + 1);
            $fileName = str_replace(self::NAMESPACE_SEPARATOR, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
        }
        $fileName .= str_replace("_", DIRECTORY_SEPARATOR, $className) . self::FILE_EXTENSION;

        foreach ($this->paths as $path) {
            $filePath = $path . DIRECTORY_SEPARATOR . $fileName;
            if (file_exists($filePath)) {
                require_once $filePath;
            }
        }
    }
809582
public static function load($className)
    {
        $namespace = __NAMESPACE__ . '\\';
        $length    = strlen($namespace);

        //        if (substr($className, 0, $length) !== $namespace) {
        if (0 !== strpos($className, $namespace)) {
            return;
        }

        // init() must have been called before
        assert(self::$libDir !== null);

        require self::$libDir . substr($className, $length) . self::EXTENSION;
    }
1019116
public static function getNamespace($className)
        {
            $className = trim($className, '\\');

            if ($lastSeparator = strrpos($className, '\\')) {
                return substr($className, 0, $lastSeparator + 1);
            }

            return '';
        }
1011232
protected static function getClassName($className) {
		if (class_exists($className)) {
			while (class_exists('ux_' . $className, FALSE)) {
				$className = 'ux_' . $className;
			}
		}

		return $className;
	}
953399
public function isClassSafeForInstantiation ($className)
	{
		$className = strtolower ($className);

		// does it have namespaces?
		if (FALSE !== strpos ($className, '\\'))
		{
			return false;
		}
		if ($className === 'parent')
		{
			return true;
		}
		// check if it's in the black list
		if (in_array ($className, $this->unsafeForInstantiation))
		{
			return false;
		}
		// check if it's a php native class
		elseif (in_array ($className, array_map ('strtolower', get_declared_classes())))
		{
			return true;
		}

		return false;
	}
150919
protected function getRealClass($className)
    {
        if (Version::compare('2.2.0') <= 0) {
            return ClassUtils::getRealClass($className);
        }

        if (substr($className, -5) === 'Proxy') {
            return substr($className, 0, -5);
        }

        return $className;
    }
682395
protected function getClassName($className) {
        if (strpos($className, ':') !== false) {
           list($namespaceAlias, $simpleClassName) = explode(':', $className);
           $className = $this->doctrine->getManager()->getConfiguration()
               ->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        return $className;
    }
458394
public function getAssetHandler($className)
    {
        if (false === array_key_exists($className, $this->instances)) {
            if (false === class_exists($className)) {
                throw ClassNotFoundException::wrongAssetHandlerClassName($className);
            }

            $instance = GeneralUtility::makeInstance($className, $this);

            if (false === $instance instanceof AbstractAssetHandler) {
                throw InvalidArgumentTypeException::wrongAssetHandlerType(get_class($instance));
            }

            $this->instances[$className] = $instance;
        }

        return $this->instances[$className];
    }
1332140
function &findClass($className)
    {
        $return = NULL;
        if (isset($this->_classes[$className])) {
            $return =& $this->_classes[$className];
        }

        return $return;
    }
262894
public function resolve(string $typeName): string
    {
        if (!isset($this->cache[$typeName])) {
            foreach ($this->resourceNamespaces as $resourceNamespace) {
                if (class_exists($this->cache[$typeName] = $this->qualify($resourceNamespace, $typeName))) {
                    return $this->cache[$typeName];
                }
            }

            throw new ClassNotFoundException(
                sprintf(
                    "Did not find type '%s' in namespace(s) '%s'.",
                    $typeName,
                    implode(', ', $this->resourceNamespaces)
                )
            );
        }

        return $this->cache[$typeName];
    }