| @@ 122-135 (lines=14) @@ | ||
| 119 | /** |
|
| 120 | * {@inheritdoc} |
|
| 121 | */ |
|
| 122 | public function supports(string $class): bool |
|
| 123 | { |
|
| 124 | $metadataFactory = $this->entityManager->getMetadataFactory(); |
|
| 125 | ||
| 126 | $supports = false; |
|
| 127 | try { |
|
| 128 | $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class)); |
|
| 129 | $supports = true; |
|
| 130 | } catch (MappingException $exception) { |
|
| 131 | // no metadata - class is not known to the ORM |
|
| 132 | } |
|
| 133 | ||
| 134 | return $supports; |
|
| 135 | } |
|
| 136 | ||
| 137 | /** |
|
| 138 | * {@inheritdoc} |
|
| @@ 127-140 (lines=14) @@ | ||
| 124 | /** |
|
| 125 | * {@inheritdoc} |
|
| 126 | */ |
|
| 127 | public function supports(string $class): bool |
|
| 128 | { |
|
| 129 | $metadataFactory = $this->documentManager->getMetadataFactory(); |
|
| 130 | ||
| 131 | $supports = false; |
|
| 132 | try { |
|
| 133 | $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class)); |
|
| 134 | $supports = true; |
|
| 135 | } catch (MappingException $exception) { |
|
| 136 | // no metadata - class is not known to phpcr-odm |
|
| 137 | } |
|
| 138 | ||
| 139 | return $supports; |
|
| 140 | } |
|
| 141 | ||
| 142 | /** |
|
| 143 | * {@inheritdoc} |
|