public function getManagerForClass($class)
    {
        $reflectionClass = new \ReflectionClass($class);
        if ($reflectionClass->implementsInterface(Proxy::class)) {
            $class = $reflectionClass->getParentClass()->name;
        }

        foreach ($this->getManagerNames() as $name) {
            $manager = $this->getManager($name);
            if (!$manager->getMetadataFactory()->isTransient($class)) {
                return $manager;
            }
        }
    }
public function getManagerForClass($class)
    {
        $reflectionClass = new \ReflectionClass($class);
        if ($reflectionClass->implementsInterface(Proxy::class)) {
            $class = $reflectionClass->getParentClass()->name;
        }

        foreach ($this->getManagerNames() as $name) {
            $manager = $this->getManager($name);
            if (!$manager->getMetadataFactory()->isTransient($class)) {
                return $manager;
            }
        }
    }
@param string $class

@return EntityManager|ObjectManager|null