src/Component/Resource/Repository/Doctrine/MongoDB/RepositoryFactory.php 1 location
|
@@ 43-58 (lines=16) @@
|
40 |
|
/** |
41 |
|
* {@inheritdoc} |
42 |
|
*/ |
43 |
|
protected function createRepository(DocumentManager $documentManager, $documentName) |
44 |
|
{ |
45 |
|
$metadata = $documentManager->getClassMetadata($documentName); |
46 |
|
$repository = $metadata->customRepositoryClassName; |
47 |
|
|
48 |
|
if ($repository === null) { |
49 |
|
$repository = $documentManager->getConfiguration()->getDefaultRepositoryClassName(); |
50 |
|
} |
51 |
|
|
52 |
|
return $this->createResourceRepository( |
53 |
|
$repository, |
54 |
|
$documentManager, |
55 |
|
$metadata, |
56 |
|
$this->resolveResource($metadata->getName()) |
57 |
|
); |
58 |
|
} |
59 |
|
|
60 |
|
/** |
61 |
|
* @param string $class |
src/Component/Resource/Repository/Doctrine/ORM/RepositoryFactory.php 1 location
|
@@ 66-81 (lines=16) @@
|
63 |
|
* |
64 |
|
* @return ObjectRepository |
65 |
|
*/ |
66 |
|
protected function createRepository(EntityManagerInterface $entityManager, $entityName) |
67 |
|
{ |
68 |
|
$metadata = $entityManager->getClassMetadata($entityName); |
69 |
|
$repository = $metadata->customRepositoryClassName; |
70 |
|
|
71 |
|
if ($repository === null) { |
72 |
|
$repository = $entityManager->getConfiguration()->getDefaultRepositoryClassName(); |
73 |
|
} |
74 |
|
|
75 |
|
return $this->createResourceRepository( |
76 |
|
$repository, |
77 |
|
$entityManager, |
78 |
|
$metadata, |
79 |
|
$this->resolveResource($metadata->getName()) |
80 |
|
); |
81 |
|
} |
82 |
|
|
83 |
|
/** |
84 |
|
* @param string $class |