/**
* @template T of object
*
* @param class-string<T> $class
*
* @return array{0:ClassMetadata<T>, 1:string}|null
*/
protected function getMetadata(string
$class) { // normalize class name
$class = self::
getRealClass(ltrim($class, '\\'
));
if (\
array_key_exists($class,
$this->cache
)) { return $this->cache
[$class];
} $this->cache
[$class] = null;
foreach ($this->registry->
getManagers() as $name =>
$em) { try { return $this->cache
[$class] =
[$em->
getClassMetadata($class),
$name];
} catch (MappingException
) { // not an entity or mapped super class