| @@ 96-109 (lines=14) @@ | ||
| 93 | /** |
|
| 94 | * {@inheritdoc} |
|
| 95 | */ |
|
| 96 | public function supports(string $class): bool |
|
| 97 | { |
|
| 98 | $metadataFactory = $this->entityManager->getMetadataFactory(); |
|
| 99 | ||
| 100 | $supports = false; |
|
| 101 | try { |
|
| 102 | $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class)); |
|
| 103 | $supports = true; |
|
| 104 | } catch (MappingException $exception) { |
|
| 105 | // no metadata - class is not known to the ORM |
|
| 106 | } |
|
| 107 | ||
| 108 | return $supports; |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * {@inheritdoc} |
|
| @@ 101-114 (lines=14) @@ | ||
| 98 | /** |
|
| 99 | * {@inheritdoc} |
|
| 100 | */ |
|
| 101 | public function supports(string $class): bool |
|
| 102 | { |
|
| 103 | $metadataFactory = $this->documentManager->getMetadataFactory(); |
|
| 104 | ||
| 105 | $supports = false; |
|
| 106 | try { |
|
| 107 | $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class)); |
|
| 108 | $supports = true; |
|
| 109 | } catch (MappingException $exception) { |
|
| 110 | // no metadata - class is not known to phpcr-odm |
|
| 111 | } |
|
| 112 | ||
| 113 | return $supports; |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * {@inheritdoc} |
|