|
@@ 86-103 (lines=18) @@
|
| 83 |
|
return $this->lockAdapterFactoryContainer; |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
public function getConnection(string $vaultTitle): ConnectionAdapterInterface |
| 87 |
|
{ |
| 88 |
|
$connectionConfiguration = $this->configuration->getConnectionConfigurationByTitle($vaultTitle); |
| 89 |
|
|
| 90 |
|
if ($connectionConfiguration === null) |
| 91 |
|
{ |
| 92 |
|
throw new \InvalidArgumentException(sprintf('Unknown connection title: "%s".', $vaultTitle)); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
$connection = $this->connectionAdapterFactoryContainer->get($connectionConfiguration->getVaultAdapter(), $connectionConfiguration); |
| 96 |
|
|
| 97 |
|
if ($connection === null) |
| 98 |
|
{ |
| 99 |
|
throw new ConfigurationException(sprintf('Unknown connection adapter: "%s".', $connectionConfiguration->getVaultAdapter())); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
return $connection; |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
public function getLockAdapter(string $vaultTitle): LockAdapterInterface |
| 106 |
|
{ |
|
@@ 105-122 (lines=18) @@
|
| 102 |
|
return $connection; |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
public function getLockAdapter(string $vaultTitle): LockAdapterInterface |
| 106 |
|
{ |
| 107 |
|
$connectionConfiguration = $this->configuration->getConnectionConfigurationByTitle($vaultTitle); |
| 108 |
|
|
| 109 |
|
if ($connectionConfiguration === null) |
| 110 |
|
{ |
| 111 |
|
throw new \InvalidArgumentException(sprintf('Unknown connection title: "%s".', $vaultTitle)); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
$lockAdapter = $this->lockAdapterFactoryContainer->get($connectionConfiguration->getLockAdapter(), $connectionConfiguration); |
| 115 |
|
|
| 116 |
|
if ($lockAdapter === null) |
| 117 |
|
{ |
| 118 |
|
throw new ConfigurationException(sprintf('Unknown lock adapter: "%s".', $connectionConfiguration->getLockAdapter())); |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
return $lockAdapter; |
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
public function buildOperationCollection(): OperationCollection |
| 125 |
|
{ |