src/Registry/DoctrineDbalConnectionRegistry.php 1 location
|
@@ 68-79 (lines=12) @@
|
65 |
|
* |
66 |
|
* @throws \InvalidArgumentException |
67 |
|
*/ |
68 |
|
public function getConnection($name = null): Connection |
69 |
|
{ |
70 |
|
$this->loadConnections(); |
71 |
|
|
72 |
|
$name = $name ?? $this->getDefaultConnectionName(); |
73 |
|
|
74 |
|
if (!isset($this->connections[$name])) { |
75 |
|
throw new \InvalidArgumentException(sprintf('Missing connection with name "%s".', $name)); |
76 |
|
} |
77 |
|
|
78 |
|
return $this->connections[$name]; |
79 |
|
} |
80 |
|
|
81 |
|
/** |
82 |
|
* @return Connection[] |
src/Registry/DoctrineOrmManagerRegistry.php 1 location
|
@@ 74-85 (lines=12) @@
|
71 |
|
* |
72 |
|
* @throws \InvalidArgumentException |
73 |
|
*/ |
74 |
|
public function getConnection($name = null): Connection |
75 |
|
{ |
76 |
|
$this->loadConnections(); |
77 |
|
|
78 |
|
$name = $name ?? $this->getDefaultConnectionName(); |
79 |
|
|
80 |
|
if (!isset($this->connections[$name])) { |
81 |
|
throw new \InvalidArgumentException(sprintf('Missing connection with name "%s".', $name)); |
82 |
|
} |
83 |
|
|
84 |
|
return $this->connections[$name]; |
85 |
|
} |
86 |
|
|
87 |
|
/** |
88 |
|
* @return Connection[] |