bridge/doctrine-orm/lib/OrmAgent.php 1 location
|
@@ 127-140 (lines=14) @@
|
124 |
|
/** |
125 |
|
* {@inheritdoc} |
126 |
|
*/ |
127 |
|
public function supports(string $class): bool |
128 |
|
{ |
129 |
|
$metadataFactory = $this->entityManager->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 the ORM |
137 |
|
} |
138 |
|
|
139 |
|
return $supports; |
140 |
|
} |
141 |
|
|
142 |
|
/** |
143 |
|
* {@inheritdoc} |
bridge/doctrine-phpcr-odm/lib/PhpcrOdmAgent.php 1 location
|
@@ 128-141 (lines=14) @@
|
125 |
|
/** |
126 |
|
* {@inheritdoc} |
127 |
|
*/ |
128 |
|
public function supports(string $class): bool |
129 |
|
{ |
130 |
|
$metadataFactory = $this->documentManager->getMetadataFactory(); |
131 |
|
|
132 |
|
$supports = false; |
133 |
|
try { |
134 |
|
$metadataFactory->getMetadataFor(ClassUtils::getRealClass($class)); |
135 |
|
$supports = true; |
136 |
|
} catch (MappingException $exception) { |
137 |
|
// no metadata - class is not known to phpcr-odm |
138 |
|
} |
139 |
|
|
140 |
|
return $supports; |
141 |
|
} |
142 |
|
|
143 |
|
/** |
144 |
|
* {@inheritdoc} |