|
@@ 105-126 (lines=22) @@
|
| 102 |
|
* |
| 103 |
|
* @return array |
| 104 |
|
*/ |
| 105 |
|
public function getListObjectManagerName() |
| 106 |
|
{ |
| 107 |
|
if ($this->listObjectManagerName) { |
| 108 |
|
return $this->listObjectManagerName; |
| 109 |
|
} |
| 110 |
|
|
| 111 |
|
if (!$this->isValidDoctrineOrmModuleEntityManagerConfig()) { |
| 112 |
|
$this->listObjectManagerName = []; |
| 113 |
|
return $this->listObjectManagerName; |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
$doctrineConfig = $this->getDoctrineConfig(); |
| 117 |
|
|
| 118 |
|
$listObjectManagerName = array_keys($doctrineConfig['entitymanager']); |
| 119 |
|
$prepareListObjectManagerName = array_map(function ($objectManagerName) { |
| 120 |
|
return 'doctrine.entitymanager.' . $objectManagerName; |
| 121 |
|
}, $listObjectManagerName); |
| 122 |
|
|
| 123 |
|
$this->listObjectManagerName = array_combine($listObjectManagerName, $prepareListObjectManagerName); |
| 124 |
|
|
| 125 |
|
return $this->listObjectManagerName; |
| 126 |
|
} |
| 127 |
|
|
| 128 |
|
|
| 129 |
|
/** |
|
@@ 134-155 (lines=22) @@
|
| 131 |
|
* |
| 132 |
|
* @return array |
| 133 |
|
*/ |
| 134 |
|
public function getListConnectionName() |
| 135 |
|
{ |
| 136 |
|
if ($this->listConnectionName) { |
| 137 |
|
return $this->listConnectionName; |
| 138 |
|
} |
| 139 |
|
|
| 140 |
|
if (!$this->isValidDoctrineOrmModuleEntityManagerConfig()) { |
| 141 |
|
$this->listConnectionName = []; |
| 142 |
|
return $this->listConnectionName; |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
$doctrineConfig = $this->getDoctrineConfig(); |
| 146 |
|
|
| 147 |
|
$listConnectionName = array_keys($doctrineConfig['connection']); |
| 148 |
|
$prepareListConnectionName = array_map(function ($connectionName) { |
| 149 |
|
return 'doctrine.connection.' . $connectionName; |
| 150 |
|
}, $listConnectionName); |
| 151 |
|
|
| 152 |
|
$this->listConnectionName = array_combine($listConnectionName, $prepareListConnectionName); |
| 153 |
|
|
| 154 |
|
return $this->listConnectionName; |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
/** |
| 158 |
|
* @inheritdoc |