protected static function S3fsStream::appendGetArg in S3 File System 4.0.x
Same name and namespace in other branches
- 8.3 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::appendGetArg()
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 S3fsStream::appendGetArg()
- S3fsStream::getExternalUrl in src/
StreamWrapper/ S3fsStream.php - Returns a web accessible URL for the resource.
File
- src/
StreamWrapper/ S3fsStream.php, line 1467
Class
- S3fsStream
- Defines a Drupal s3 (s3://) stream wrapper class.
Namespace
Drupal\s3fs\StreamWrapperCode
protected static function appendGetArg($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;
}