Checks if entity class name implements interface

@param string $interfaceName

@return bool
973676
protected function entityImplements(string $interfaceName): bool
    {
        $reflectionClass = new \ReflectionClass($this->getEntityClassName());

        return $reflectionClass->implementsInterface($interfaceName);
    }
1345363
public static function checkImplement($class, string $interface){
            $ref = new \ReflectionClass($class);
            $names = $ref->getInterfaceNames();
            if(in_array($interface, $names)){
                return true;
            }else{
                return false;
            }
        }
1065336
public function hasObjectManagerNameByClassName($className)
    {
        $realClass = ClassUtils::getRealClass($className);

        if (array_key_exists($realClass, $this->classNameToObjectManagerName)) {
            return false !== $this->classNameToObjectManagerName[$realClass];
        }

        $moduleOptionsManager =  $this->getModuleOptionsManager();
        if (!$moduleOptionsManager->hasOptionsByClassName($realClass)) {
            $this->classNameToObjectManagerName[$realClass] = false;
            return false;
        }

        $moduleOptions = $moduleOptionsManager->getOptionsByClassName($realClass);

        if (!$moduleOptions instanceof ObjectManagerNameProviderInterface) {
            $this->classNameToObjectManagerName[$realClass] = false;
            return false;
        }

        $objectManagerName = $moduleOptions->getObjectManagerName();

        if (!is_string($objectManagerName)) {
            $this->classNameToObjectManagerName[$realClass] = false;
            return false;
        }
        $this->classNameToObjectManagerName[$realClass] = $objectManagerName;

        return false !== $this->classNameToObjectManagerName[$realClass];
    }
1143821
public function isNewEntity(EntityInterface $entity)
    {
        $reflection = $this->getEntityClassReflection();
        $metadata = $this->getEntityMetadata();
        $identifier = $metadata->getName($metadata->getIdentifier(), Metadata::CAMILIZED);
        
        return null !== $identifier
            ? ($reflection->getProperty($identifier)->getValue($entity) === null) : true;
    }
974477
final protected function assertClassImplementsInterface(string $interfaceName, string $className): void
    {
        $this->assertInterfaceExists($interfaceName);
        $this->assertClassExists($className);

        $reflection = new \ReflectionClass($className);

        self::assertTrue($reflection->implementsInterface($interfaceName), \sprintf(
            'Failed asserting that class "%s" implements interface "%s".',
            $className,
            $interfaceName
        ));
    }
1326602
public function canAdd(ResourceEntityInterface $entity)
    {
        return empty($this->className)
            || get_class($entity) == $this->className;
    }
1060604
protected function isValidApplicationClass(string $className): bool
    {
        $reflectionClass = new ReflectionClass($className);

        return
            $reflectionClass->isInstantiable() === true &&
            $reflectionClass->implementsInterface(ApplicationInterface::class) === true;
    }
365205
protected function hasFacadeInterface(ClassNode $node, ASTArtifactList $implementedInterfaces)
    {
        $expectedInterfaceName = $node->getImage() . 'Interface';
        foreach ($implementedInterfaces as $implementedInterface) {
            $interfaceName = $implementedInterface->getName();
            if ($interfaceName === $expectedInterfaceName) {
                return true;
            }
        }

        return false;
    }
1009798
public function isOperational($moduleName) {
    	if(!array_key_exists($moduleName, $this->modules_list)) {
    		if($module = fw\Module::getModuleByName($moduleName)) {
    			if($module instanceof DependentInterface) {
    				if($module->validatePrerequisites()) {
    					$this->modules_list[$moduleName] = TRUE;
    					return true;
    				} else {
    					// Do not cache the result,
    					// as they could change by the next call to the method
    					return false;
    				}
    			}
    			else {
    				$this->modules_list[$moduleName] = TRUE;
    				return true;
    			}
    		}
    		else {
    			$this->modules_list[$moduleName] = FALSE;
    		}
    	}
    	return $this->modules_list[$moduleName];
    	
    }
1317024
public function addInterface(string $interfaceName, string $alias = null)
    {
        $this->interfaces[] = $this->addUse($interfaceName, $alias);
    }
975935
public function isMethodFinal($className, $methodName)
    {
        $className = $this->prepareClassReflectionForUsage($className);
        return isset($this->classReflectionData[$className][self::DATA_CLASS_METHODS][$methodName][self::DATA_METHOD_FINAL]);
    }
679756
public function isRegistered($entityClassName)
    {
        if ($entityClassName instanceof Entity) {
            $reflection = new \ReflectionClass($entityClassName); // @codeCoverageIgnore
            $entityClassName = $reflection->getName(); // @codeCoverageIgnore
        } // @codeCoverageIgnore

        return isset($this->entities[$entityClassName]);
    }
149178
protected static function & checkClassInterfaceGetPublicStaticMethods ($interfaceName) {
		if (!isset(static::$interfacesStaticMethodsCache[$interfaceName])) {
			$methods = [];
			$interfaceType = new \ReflectionClass($interfaceName);
			$publicOrStaticMethods = $interfaceType->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_STATIC);
			/** @var $publicOrStaticMethod \ReflectionMethod */
			foreach ($publicOrStaticMethods as $publicOrStaticMethod) {
				// filter methods for public and also static method only
				if ($publicOrStaticMethod->isStatic() && $publicOrStaticMethod->isPublic()) {
					$methods[] = $publicOrStaticMethod->getName();
				}
			}
			static::$interfacesStaticMethodsCache[$interfaceName] = $methods;
		}
		return static::$interfacesStaticMethodsCache[$interfaceName];
	}
72131
public static function classImplements($className, $interfaceName)
    {
        $lowerClassName = strtolower($className);
        $implementors = self::implementorsOf($interfaceName);
        return isset($implementors[$lowerClassName]);
    }
313830
public function supportsEntity(EntityInterface $entity): bool
    {
        foreach ($this->mappers as $mapper) {
            if ($mapper->supportsEntity($entity)) {
                return true;
            }
        }

        return false;
    }
1369523
final public function checkInjections($className) {
        if (is_array($this->inject())) {
            foreach ($this->inject() as $classArray) {
                if (!is_array($classArray) ||
                        (is_array($classArray) && !isset($classArray['class'])) ||
                        (is_array($classArray) && !class_exists($classArray['class'])))
                    continue;

                if ($classArray['class'] === $className)
                    return false;

                if (!$this->canInject($classArray, $className))
                    return false;
            }
        }

        return true;
    }
198992
public function isClassAbstract($className)
    {
        $className = $this->prepareClassReflectionForUsage($className);
        return isset($this->classReflectionData[$className][self::DATA_CLASS_ABSTRACT]);
    }