| @@ 280-285 (lines=6) @@ | ||
| 277 | */ |
|
| 278 | public static function toRegEx($glob, $flags = 0, $delimiter = '~') |
|
| 279 | { |
|
| 280 | if (!Path::isAbsolute($glob) && false === strpos($glob, '://')) { |
|
| 281 | throw new InvalidArgumentException(sprintf( |
|
| 282 | 'The glob "%s" is not absolute and not a URI.', |
|
| 283 | $glob |
|
| 284 | )); |
|
| 285 | } |
|
| 286 | ||
| 287 | $inSquare = false; |
|
| 288 | $curlyLevels = 0; |
|
| @@ 425-430 (lines=6) @@ | ||
| 422 | */ |
|
| 423 | public static function getStaticPrefix($glob, $flags = 0) |
|
| 424 | { |
|
| 425 | if (!Path::isAbsolute($glob) && false === strpos($glob, '://')) { |
|
| 426 | throw new InvalidArgumentException(sprintf( |
|
| 427 | 'The glob "%s" is not absolute and not a URI.', |
|
| 428 | $glob |
|
| 429 | )); |
|
| 430 | } |
|
| 431 | ||
| 432 | $prefix = ''; |
|
| 433 | $length = strlen($glob); |
|