Lines Matching refs:dsn

33     public static function parseFunc(string $dsn): DsnFunction  argument
37 if (1 === preg_match(self::FUNCTION_REGEX, $dsn, $matches)) {
43 $arguments = $dsn;
47 …throw new SyntaxException($dsn, 'dsn' === $functionName ? 'The DSN is empty' : 'A function must ha…
64 public static function parse(string $dsn): Dsn argument
66 if (1 === preg_match(self::FUNCTION_REGEX, $dsn, $matches)) {
70 throw new FunctionsNotAllowedException($dsn);
73 return self::getDsn($dsn);
76 public static function parseUrl(string $dsn): Url argument
78 $dsn = self::parse($dsn);
79 if (!$dsn instanceof Url) {
80 throw DsnTypeNotSupported::onlyUrl($dsn);
83 return $dsn;
86 public static function parsePath(string $dsn): Path argument
88 $dsn = self::parse($dsn);
89 if (!$dsn instanceof Path) {
90 throw DsnTypeNotSupported::onlyPath($dsn);
93 return $dsn;
99 private static function parseArguments(string $dsn) argument
102 if (1 === preg_match(self::FUNCTION_REGEX, $dsn)) {
103 return self::parseFunc($dsn);
107 return self::getDsn($dsn);
113 private static function getDsn(string $dsn): Dsn argument
116 …LIMS.'%]+:[0-9]+(?:[/?].*)?)|(?<scheme>[a-zA-Z0-9\+-\.]+):(?://)?(?<dsn>.*))$#', $dsn, $matches)) {
117 … throw new SyntaxException($dsn, 'A DSN must contain a scheme [a-zA-Z0-9\+-\.]+ and a colon.');
120 $dsn = $matches['alt'];
123 $dsn = $matches['dsn'];
126 if ('' === $dsn) {
131 …B_DELIMS.'%]+)?(?::(['.self::UNRESERVED.self::SUB_DELIMS.'%]*))?@)?([^\s@]+)$#', $dsn, $matches)) {
132 …throw new SyntaxException($dsn, 'The provided DSN is not valid. Maybe you need to url-encode the u…
162 private static function explodeUrl(string $url, string $dsn): array argument
166 throw new SyntaxException($dsn, 'The provided DSN is not valid.');