Lines Matching refs:matches
37 if (1 === preg_match(self::FUNCTION_REGEX, $dsn, $matches)) {
38 $functionName = $matches[1];
39 $arguments = $matches[2];
40 parse_str($matches[3] ?? '', $parameters);
51 if (preg_match_all(self::ARGUMENTS_REGEX, $arguments, $matches)) {
52 $arguments = $matches[1];
66 if (1 === preg_match(self::FUNCTION_REGEX, $dsn, $matches)) {
67 if ('dsn' === $matches[1]) {
68 return self::parse($matches[2]);
116 if (!preg_match('#^(?:(?<alt>['.self::UNRESERVED.self::SUB_DELIMS.'%]+:[0-9]+(?:[/?].*)?)|(?<scheme>[a-zA-Z0-9\+-\.]+):(?://)?(?<dsn>.*))$#', $dsn, $matches)) {
120 $dsn = $matches['alt'];
121 if (!empty($matches['scheme'])) {
122 $scheme = $matches['scheme'];
123 $dsn = $matches['dsn'];
131 if (!preg_match('#^(?:(['.self::UNRESERVED.self::SUB_DELIMS.'%]+)?(?::(['.self::UNRESERVED.self::SUB_DELIMS.'%]*))?@)?([^\s@]+)$#', $dsn, $matches)) {
136 'user' => empty($matches[1]) ? null : urldecode($matches[1]),
137 'password' => empty($matches[2]) ? null : urldecode($matches[2]),
140 if ('?' === $matches[3][0]) {
141 $parts = self::explodeUrl('http://localhost'.$matches[3], $dsn);
146 if ('/' === $matches[3][0]) {
147 $parts = self::explodeUrl($matches[3], $dsn);
152 $parts = self::explodeUrl('http://'.$matches[3], $dsn);