public static function objectUrl($base, $oname) {
    if (strpos($oname, '/') === FALSE) {
      return $base . '/' . rawurlencode($oname);
    }

    $oParts = explode('/', $oname);
    $buffer = array();
    foreach ($oParts as $part) {
      $buffer[] = rawurlencode($part);
    }
    $newname = implode('/', $buffer);
    return $base . '/' . $newname;
  }
public static function objectUrl($base, $oname) {
    if (strpos($oname, '/') === FALSE) {
      return $base . '/' . rawurlencode($oname);
    }

    $oParts = explode('/', $oname);
    $buffer = array();
    foreach ($oParts as $part) {
      $buffer[] = rawurlencode($part);
    }
    $newname = implode('/', $buffer);
    return $base . '/' . $newname;
  }
public static function objectUrl ( $ base , $ oname ) { if ( strpos ( $ oname , '/' ) === FALSE ) { return $ base . '/' . rawurlencode ( $ oname ) ; } $ oParts = explode ( '/' , $ oname ) ; $ buffer = array ( ) ; foreach ( $ oParts as $ part ) { $ buffer [ ] = rawurlencode ( $ part ) ; } $ newname = implode ( '/' , $ buffer ) ; return $ base . '/' . $ newname ; }
Create an object URL.

Given a base URL and an object name, create an object URL.

This is useful because object names can contain certain characters
(namely slashes (`/`)) that are normally URLencoded when they appear
inside of path sequences.

@note
Swift does not distinguish between @c %2F and a slash character, so
this is not strictly necessary.

@param string $base
The base URL. This is not altered; it is just prepended to
the returned string.
@param string $oname
The name of the object.
@retval string
@return string
The URL to the object. Characters that need escaping will be escaped,
while slash characters are not. Thus, the URL will look pathy.
Create an object URL .