Detailed is_a()

@param  string $classOrInterface
@param  mixed $objectToMatch
@return bool
@access protected
174242
protected function matchObjectWithClass(
        /*# string */ $classOrInterface,
        $objectToMatch
    )/*# : bool */ {
        if (is_object($objectToMatch) &&
            is_a($objectToMatch, $classOrInterface)) {
            return true;
        }
        return false;
    }
350745
protected function isPrefixable($objectOrClassName): bool
    {
        if (is_string($objectOrClassName)) {
            return in_array(Prefixable::class, class_implements($objectOrClassName), true);
        }

        if (is_object($objectOrClassName)) {
            return $objectOrClassName instanceof Prefixable;
        }

        return false;
    }
725675
public function isTransient($className)
    {
        if (!\class_exists($className)) {
            return false;
        }

        $instances = \class_implements($className);
        if ($instances === false) {
            return false;
        }

        if (!\in_array(EntityInterface::class, $instances)) {
            return false;
        }
//        if (!\in_array(DatabaseEntityInterface::class, $instances)) {
//            return false;
//        }

        return true;
    }
843779
public function hasObjectManagerByClassName($className)
    {
        $realClass = ClassUtils::getRealClass($className);

        if ($this->hasObjectManagerNameByClassName($realClass)) {
            $objectManagerName = $this->getObjectManagerNameByClassName($realClass);
            return $this->getDoctrineObjectManager()->has($objectManagerName);
        }
        return false;
    }
627386
public function isValidObject($objectType)
    {
        //====================================================================//
        // Verify Result in Cache
        if (isset($this->ValidLocalObject[$objectType])) {
            return $this->ValidLocalObject[$objectType];
        }

        $this->ValidLocalObject[$objectType] = false;

        //====================================================================//
        // Verify Local Core Class Exist & Is Valid
        if (!$this->isValidLocalClass()) {
            return false;
        }
        //====================================================================//
        // Check if Object Manager is NOT Overriden
        if (!(Splash::local() instanceof ObjectsProviderInterface)) {
            //====================================================================//
            // Verify Object File Exist & is Valid
            if (!$this->isValidObjectFile($objectType)) {
                return false;
            }
        }
        //====================================================================//
        // Verify Object Class Exist & is Valid
        if (!$this->isValidObjectClass($objectType)) {
            return false;
        }

        $this->ValidLocalObject[$objectType] = true;

        return true;
    }
39276
private function isValidObjectClass($className)
    {
        //====================================================================//
        // Safety Check => Object Type is String
        if (!is_string($className)) {
            return "Object Type is Not a String";
        }
        //====================================================================//
        // Safety Check => Class Exists
        if (!class_exists($className)) {
            return "Object Class Not Found";
        }
        //====================================================================//
        // Safety Check => Class Extends
        if (!is_subclass_of($className, AbstractObject::class)) {
            return "Object Class MUST extends ".AbstractObject::class;
        }

        return true;
    }
321158
private ObjectCache getCachePerClass(Class objectClass, int methodCall)
    {
        ObjectCache cache = (ObjectCache) cachesByClass.get(objectClass.getName());
        if (cache == null && methodCall == AbstractMetaCache.METHOD_CACHE)
        {
            /**
             * the cache wasn't found, and the cachesByClass didn't contain the key with a
             * null value, so create a new cache for this classtype
             */
            cache = new ObjectCacheJCSImpl(objectClass.getName());
            cachesByClass.put(objectClass.getName(), cache);
        }
        return cache;
    }
450030
public static function implementsInterface($class_name, $interface_name)
    {
        if (is_object($class_name)) {
            $class_name = get_class($class_name);
        }
        if (class_exists($class_name)) {
            $interfaces = class_implements($class_name);
            return (bool) in_array($interface_name, $interfaces) || in_array(trim($interface_name, '\\'), $interfaces);
        }
        return false;
    }
623363
public function process(
        ObjectInterface $object,
        ResolvedFixtureSet $fixtureSet,
        GenerationContext $context,
        MethodCallInterface $methodCall
    ): ResolvedFixtureSet {
        /** @var StaticReference $reference */
        $reference = $methodCall->getCaller();

        if (false === ($reference instanceof StaticReference)) {
            throw new \LogicException('TODO');
        }

        $result = $reference->getId()::{$methodCall->getMethod()}(...$methodCall->getArguments());

        if ($context->needsCallResult()) {
            $object = $object->withInstance($result);
        }

        return $fixtureSet->withObjects(
            $fixtureSet->getObjects()->with($object)
        );
    }
1061759
private function isTranslation(ClassMetadata $classMetadata)
    {
        return $this->getClassAnalyzer()->hasTrait($classMetadata->reflClass, $this->translationTrait);
    }
1299575
private function isTimestampable(ClassMetadata $classMetadata)
    {
        return $this->getClassAnalyzer()->hasTrait(
            $classMetadata->reflClass,
            $this->timestampableTrait,
            $this->isRecursive
        );
    }
408218
protected function getMatchingClassNameIn($object, array $classList) : ?string
    {
        $actualClassList = array_merge(
            [get_class($object)],
            class_implements($object),
            class_uses($object)
        );
        $parentClass = get_parent_class($object);
        while (false !== $parentClass) {
            $actualClassList[] = $parentClass;
            $parentClass = get_parent_class($parentClass);
        }

        $matchList = array_intersect($actualClassList, $classList);

        return array_pop($matchList);
    }
160323
public static function updateObjectState( $objectID, $objectStateList )
    {
        $searchEngine = eZSearch::getEngine();

        if ( $searchEngine instanceof ezpSearchEngine && method_exists( $searchEngine, 'updateObjectState' ) )
        {
            return $searchEngine->updateObjectState( $objectID, $objectStateList );
        }

        return false;
    }
1353831
public function isEmbeddedObject(array $objectElement)
    {
        foreach ($objectElement as $childKey => $childValue) {
            $childKeyIndicator = substr($childKey, 0, 1);
            if ($childKeyIndicator !== '#' && $childKeyIndicator !== '_') {
                return true;
            }
        }

        return false;
    }
321260
private function checkVisibilityProtected(string &$methodName, string &$statedClassOrigin): bool
    {
        if (false === $this->reflectionsMethods[$methodName]->isPrivate()
            && !empty($statedClassOrigin)
            && ($statedClassOrigin === $this->statedClassName
                || \is_subclass_of($statedClassOrigin, $this->statedClassName))) {
            //It's a public or protected method, do like if there is no method
            return true;
        }

        return false;
    }
1132570
public function isTransient($className)
    {
        return
            !$this->mappers->hasMapperFor($className) ||
            $this->mappers->getMapperFor($className)->isTransient();
    }
519772
public function isMethodPrivate($className, $methodName)
    {
        $className = $this->prepareClassReflectionForUsage($className);
        return (isset($this->classReflectionData[$className][self::DATA_CLASS_METHODS][$methodName][self::DATA_METHOD_VISIBILITY]) && $this->classReflectionData[$className][self::DATA_CLASS_METHODS][$methodName][self::DATA_METHOD_VISIBILITY] === self::VISIBILITY_PRIVATE);
    }