protected static function S3fsStreamWrapper::_append_get_arg in S3 File System 7.3
Same name and namespace in other branches
- 7.2 S3fsStreamWrapper.inc \S3fsStreamWrapper::_append_get_arg()
Helper function to safely append a GET argument to a given base URL.
Parameters
string $base_url: The URL onto which the GET arg will be appended.
string $name: The name of the GET argument.
string $value: The value of the GET argument. Optional.
Return value
string The converted path GET argument.
1 call to S3fsStreamWrapper::_append_get_arg()
- S3fsStreamWrapper::getExternalUrl in ./
S3fsStreamWrapper.inc - Returns a web accessible URL for the resource.
File
- ./
S3fsStreamWrapper.inc, line 1251 - Drupal stream wrapper implementation for S3 File System.
Class
- S3fsStreamWrapper
- The stream wrapper class.
Code
protected static function _append_get_arg($base_url, $name, $value = NULL) {
$separator = strpos($base_url, '?') === FALSE ? '?' : '&';
$new_url = "{$base_url}{$separator}{$name}";
if ($value !== NULL) {
$new_url .= "={$value}";
}
return $new_url;
}