Returns whether the class with the specified name should have
its metadata loaded.

This can be used for cache warming, where all the class metadata
gets loaded during the deployment process.

@param string $className

@return bool
167402
public function isTransient($className)
    {
        foreach ($this->drivers as $driver) {
            if (false !== $driver->isTransient($className)) {
                return true;
            }
        }

        return false;
    }
975935
public function isMethodFinal($className, $methodName)
    {
        $className = $this->prepareClassReflectionForUsage($className);
        return isset($this->classReflectionData[$className][self::DATA_CLASS_METHODS][$methodName][self::DATA_METHOD_FINAL]);
    }
1363317
public function loadClass( $className )
	{
		if( $this->prefix )
		{
			$prefix	= strtolower( substr( $className, 0, strlen( $this->prefix ) ) );
			if( $prefix != $this->prefix )
				return FALSE;
			$className	= str_ireplace( $this->prefix, '', $className );
		}
		$basePath		= $this->path ? $this->path : "";
		if( $this->lowerPath )
		{
			$matches	= array();
			preg_match_all( '/^(.*)([a-z0-9]+)$/iU', $className, $matches );
			$fileName	= $matches[2][0];
			$pathName	= str_replace( "_","/", strtolower( $matches[1][0] ) );
			$fileName	= $pathName.$fileName;
		}
		else
			$fileName	= str_replace( "_","/", $className );
		foreach( $this->extensions as $extension )
		{
			$filePath	= $basePath.$fileName.".".$extension;
			if( $this->verbose > 1 )
				echo $this->lineBreak."autoload: ".$filePath;
			if( defined( 'LOADER_LOG' ) && LOADER_LOG )
				error_log( $filePath."\n", 3, LOADER_LOG );
#			if( !@fopen( $filePath, "r", TRUE ) )
			if( !file_exists( $filePath ) )
#			if( !is_readable( $filePath ) )
				continue;
			$this->loadFile( $filePath, TRUE );
			return TRUE;
		}
		return FALSE;
	}
801953
public function getTranslatableMetadata($className)
    {
        if (array_key_exists($className, $this->cache)) {
            return $this->cache[$className];
        }

        if ($metadata = $this->metadataFactory->getMetadataForClass($className)) {
            if (!$metadata->reflection->isAbstract()) {
                $metadata->validate();
            }
        }

        $this->cache[$className] = $metadata;
        return $metadata;
    }
425724
protected function getClassMetadata($className)
    {
        if ( ! isset($this->_metadataCache[$className])) {
            $this->_metadataCache[$className] = $this->_em->getClassMetadata($className);
        }

        return $this->_metadataCache[$className];
    }
737556
public function isClassImplementationOf($className, $interfaceName)
    {
        $className = $this->prepareClassReflectionForUsage($className);

        $interfaceName = $this->cleanClassName($interfaceName);
        $this->loadOrReflectClassIfNecessary($interfaceName);

        return (isset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className]));
    }
360605
public function loadClass($className)
    {

        // concatenate namespace and separator
        $namespaceAndSeparator = $this->namespace . $this->namespaceSeparator;

        // if a namespace is available OR the classname contains a namespace
        if ($namespaceAndSeparator === substr($className, 0, strlen($namespaceAndSeparator)) || $this->namespace === null) {
            // initialize filename, classname and namespace
            $fileName = '';
            $namespace = '';
            if (($lastNsPos = strripos($className, $this->namespaceSeparator)) !== false) {
                $namespace = substr($className, 0, $lastNsPos);
                $className = substr($className, $lastNsPos + 1);
                $fileName = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
            }

            // prepare filename
            $fileName .= $className . $this->fileExtension;

            // try to load the requested class
            $toRequire = $this->includePath . DIRECTORY_SEPARATOR . $fileName;
            $psr4FileName = $this->includePath . DIRECTORY_SEPARATOR . ltrim(strstr(ltrim(strstr($fileName, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);

            // query whether or tno the file exsists
            if (file_exists($toRequire)) {
                // require the file and return TRUE
                require $toRequire;
                return true;

            } elseif (file_exists($psr4FileName) && !is_dir($psr4FileName)) {
                // require the file and return TRUE
                require $psr4FileName;
                return true;
            }
        }
    }
969143
public function hasClass($className)
    {
        if ($this->hasAttribute('class')) {
            return in_array($className, preg_split('/\s+/', $this->getAttribute('class')));
        }

        return false;
    }
699773
public function canLoadClass($className)
    {
        if ($this->namespace !== null && strpos($className, $this->namespace.$this->namespaceSeparator) !== 0) {
            return false;
        }

        $file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension;

        if ($this->includePath !== null) {
            return file_exists($this->includePath . DIRECTORY_SEPARATOR . $file);
        }

        return (false !== stream_resolve_include_path($file));
    }
1031704
protected function loadMetadata($className)
    {
        $resource = new ResourceMetadata($className);

        $this->driver->loadMetadataForClass($className, $resource);

        $this->loadedMetadata[$className] = $resource;
        $this->resourceClassMap[$resource->getName()] = $className;
    }
921085
public function load($className)
    {
        if (isset($this->_classes[$className])) {
            $file = $this->_classes[$className];
            if (!is_file($file)) {
                trigger_error(strtr('load `:class` class failed: `:file` is not exists.', [':class' => $className, ':file' => $file]), E_USER_ERROR);
            }

            //either linux or phar://
            if (PHP_EOL === "\n" || $file[0] === 'p') {
                /** @noinspection PhpIncludeInspection */
                require $file;
            } else {
                $this->requireFile($file);
            }

            return true;
        }

        /** @noinspection LoopWhichDoesNotLoopInspection */
        foreach ($this->_namespaces as $namespace => $path) {
            if (strpos($className, $namespace) !== 0) {
                continue;
            }

            $file = $path . strtr(substr($className, strlen($namespace)), '\\', '/') . '.php';
            if (is_file($file)) {
                //either linux or phar://
                if (PHP_EOL === "\n" || $file[0] === 'p') {
                    /** @noinspection PhpIncludeInspection */
                    require $file;
                } else {
                    $this->requireFile($file);
                }

                return true;
            }
        }

        return false;
    }
625644
public function getMetadataForClassName($className)
    {
        if (array_key_exists($className, $this->metadata)) {
            return $this->metadata[$className];
        }

        throw new MetadataNotFoundException($className);
    }
130739
public function loadClass($className) {
        $cache = $this->getCache();
        $entries = $cache->load($this->cacheKey);
        if($entries == false) {
            $entries = array();
        }
        $status = $this->tryAndLoadClass($className, $entries);
        if($status) {
            // class loaded
            return true;
        }
        if(preg_match($this->ignoreClassNamesRegexp, $className)) {
            return false;
        }
 
        foreach($this->classPaths as $path) {
            // Scan for file
            $realPath = $this->searchForClassFile($className, $path);
            if($realPath !== false) {
                $entries[$className] = $realPath;
                break;
            }
        }
        $cache->save($entries, $this->cacheKey);
        $status = $this->tryAndLoadClass($className, $entries);
        return $status;
    }
1152722
public function contains($className)
    {
        if (!is_string($className)) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be string, %s given', __METHOD__, (is_object($className) ? get_class($className) : gettype($className))));
        }

        $this->parseClassAttribute();

        return in_array($className, $this->classes, true);
    }
1081682
public function isClassTaggedWith($className, $tag)
    {
        if ($this->initialized === false) {
            return false;
        }
        if (!isset($this->reflectedClassNames[$className])) {
            $this->reflectClass($className);
        }
        if (!isset($this->classTagsValues[$className])) {
            return false;
        }
        return isset($this->classTagsValues[$className][$tag]);
    }
266646
public function loadMetadataForClass($className, ClassMetadata $metadata)
    {
        foreach ($this->drivers as $driver) {
            if (in_array($className, $driver->getAllClassNames())) {
                return $driver->loadMetadataForClass($className, $metadata);
            }
        }
    }
1135033
public function getMetadataFor($className) : ClassMetadata
    {
        if (isset($this->loadedMetadata[$className])) {
            return $this->loadedMetadata[$className];
        }

        $realClassName = $this->normalizeClassName($className);

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

        $metadataBuildingContext = $this->newClassMetadataBuildingContext();
        $loadingException        = null;

        try {
            if ($this->cacheDriver) {
                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);

                if ($cached instanceof ClassMetadata) {
                    $this->loadedMetadata[$realClassName] = $cached;

                    $cached->wakeupReflection($metadataBuildingContext->getReflectionService());
                } else {
                    foreach ($this->loadMetadata($realClassName, $metadataBuildingContext) as $loadedClass) {
                        $loadedClassName = $loadedClass->getClassName();

                        $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, null);
                    }
                }
            } else {
                $this->loadMetadata($realClassName, $metadataBuildingContext);
            }
        } catch (CommonMappingException $loadingException) {
            $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext);

            if (! $fallbackMetadataResponse) {
                throw $loadingException;
            }

            $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse;
        }

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

        $metadataBuildingContext->validate();

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