| @@ 158-171 (lines=14) @@ | ||
| 155 | /** |
|
| 156 | * {@inheritdoc} |
|
| 157 | */ |
|
| 158 | public function supports(string $class): bool |
|
| 159 | { |
|
| 160 | $metadataFactory = $this->entityManager->getMetadataFactory(); |
|
| 161 | ||
| 162 | $supports = false; |
|
| 163 | try { |
|
| 164 | $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class)); |
|
| 165 | $supports = true; |
|
| 166 | } catch (MappingException $exception) { |
|
| 167 | // no metadata - class is not known to the ORM |
|
| 168 | } |
|
| 169 | ||
| 170 | return $supports; |
|
| 171 | } |
|
| 172 | ||
| 173 | /** |
|
| 174 | * {@inheritdoc} |
|
| @@ 142-155 (lines=14) @@ | ||
| 139 | /** |
|
| 140 | * {@inheritdoc} |
|
| 141 | */ |
|
| 142 | public function supports(string $class): bool |
|
| 143 | { |
|
| 144 | $metadataFactory = $this->documentManager->getMetadataFactory(); |
|
| 145 | ||
| 146 | $supports = false; |
|
| 147 | try { |
|
| 148 | $metadataFactory->getMetadataFor(ClassUtils::getRealClass($class)); |
|
| 149 | $supports = true; |
|
| 150 | } catch (MappingException $exception) { |
|
| 151 | // no metadata - class is not known to phpcr-odm |
|
| 152 | } |
|
| 153 | ||
| 154 | return $supports; |
|
| 155 | } |
|
| 156 | ||
| 157 | /** |
|
| 158 | * {@inheritdoc} |
|