Lines Matching defs:dsn
77 if ('dsn' === $func->getName()) {
78 /** @var Url $dsn */
79 $dsn = $func->first();
80 $clientConfiguration = self::fromArray(self::parseDsn($dsn));
172 private static function parseDsn(Url $dsn): array
174 $data = ['host' => $dsn->getHost()];
176 if (null !== $dsn->getScheme()) {
177 $data['transport'] = $dsn->getScheme();
180 if (null !== $dsn->getUser()) {
181 $data['username'] = $dsn->getUser();
184 if (null !== $dsn->getPassword()) {
185 $data['password'] = $dsn->getPassword();
188 if (null !== $dsn->getUser() && null !== $dsn->getPassword()) {
192 if (null !== $dsn->getPort()) {
193 $data['port'] = $dsn->getPort();
196 if (null !== $dsn->getPath()) {
197 $data['path'] = $dsn->getPath();
200 foreach ($dsn->getParameters() as $optionName => $optionValue) {