protected static function S3fsStream::_append_get_arg in S3 File System 8.2
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.
1 call to S3fsStream::_append_get_arg()
- S3fsStream::getExternalUrl in src/
StreamWrapper/ S3fsStream.php - Returns a web accessible URL for the resource.
File
- src/
StreamWrapper/ S3fsStream.php, line 1589
Class
- S3fsStream
- Defines a Drupal s3fs (s3fs://) stream wrapper class.
Namespace
Drupal\s3fs\StreamWrapperCode
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;
}