yiisoft/yii2 — pull request #3659 by suralc (2014-05-31 23:11:09+00:00)
Title: Added StringHelper::parseUri

This pr adds StringHelper::parseUri.

PHPs default parse_url is as noted in the official docs not meant to spit/parse all variants of URIs.

URIs that are to some extend valid like `assets:///ae823jss/js/compact.js` (and in my case delivered by an external api) result in `false` using parse_url. The added function is however capable of parsing this string into the correct output (omitting the non-exsistant parts):
```
array(2) {
'scheme' =>
string(6) "assets"
'path' =>
string(23) "/ae823jss/js/compact.js"
}
```

The regex used is exemplified in rfc 2396 Appendix B.