protected function parseUrl($url) {
    $res = parse_url($url);


    // These have to be decode because they will later
    // be encoded.
    foreach ($res as $key => $val) {
      if ($key == 'host') {
        $res[$key] = urldecode($val);
      }
      elseif ($key == 'path') {
        if (strpos($val, '/') === 0) {
          $val = substr($val, 1);
        }
        $res[$key] = urldecode($val);

      }
    }
    return $res;
  }
protected function parseUrl($url) {
    $res = parse_url($url);


    // These have to be decode because they will later
    // be encoded.
    foreach ($res as $key => $val) {
      if ($key == 'host') {
        $res[$key] = urldecode($val);
      }
      elseif ($key == 'path') {
        if (strpos($val, '/') === 0) {
          $val = substr($val, 1);
        }
        $res[$key] = urldecode($val);

      }
    }
    return $res;
  }
protected function parseUrl ( $ url ) { $ res = parse_url ( $ url ) ; // These have to be decode because they will later // be encoded. foreach ( $ res as $ key => $ val ) { if ( $ key == 'host' ) { $ res [ $ key ] = urldecode ( $ val ) ; } elseif ( $ key == 'path' ) { if ( strpos ( $ val , '/' ) === 0 ) { $ val = substr ( $ val , 1 ) ; } $ res [ $ key ] = urldecode ( $ val ) ; } } return $ res ; }
Parse a URL.

In order to provide full UTF-8 support, URLs must be
rawurlencoded before they are passed into the stream wrapper.

This parses the URL and urldecodes the container name and
the object name.

@param string $url
A Swift URL.
@retval array
@return array
An array as documented in parse_url().
Parse a URL .