protected function StreamWrapper::injectCname in AmazonS3 7.2
Replace the host in a URL with the configured domain.
Parameters
Url $url: The URL to modify.
2 calls to StreamWrapper::injectCname()
- StreamWrapper::getCloudFrontUrl in src/
StreamWrapper.php - Get a CloudFront URL for an S3 key.
- StreamWrapper::getS3Url in src/
StreamWrapper.php - Get a regular S3 URL for a key.
File
- src/
StreamWrapper.php, line 447 - Drupal stream wrapper implementation for Amazon S3
Class
- StreamWrapper
- @file Drupal stream wrapper implementation for Amazon S3
Namespace
Drupal\amazons3Code
protected function injectCname($url) {
if (strpos($url
->getHost(), $this->config
->getDomain()) === FALSE) {
$url
->setHost($this->config
->getDomain());
}
}