public static function S3::mergeConfiguration in Flysystem - S3 8
Same name and namespace in other branches
- 2.0.x src/Flysystem/S3.php \Drupal\flysystem_s3\Flysystem\S3::mergeConfiguration()
Merges default Flysystem configuration.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.
array $configuration: A configuration array containing information about the plugin instance.
Return value
array The Flysystem configuration.
2 calls to S3::mergeConfiguration()
- S3::create in src/
Flysystem/ S3.php - Creates an instance of the plugin.
- S3Test::testMergeConfiguration in tests/
src/ Unit/ Flysystem/ S3Test.php - Tests merging defaults into configuration arrays.
File
- src/
Flysystem/ S3.php, line 161
Class
- S3
- Drupal plugin for the "S3" Flysystem adapter.
Namespace
Drupal\flysystem_s3\FlysystemCode
public static function mergeConfiguration(ContainerInterface $container, array $configuration) {
$protocol = $container
->get('request_stack')
->getCurrentRequest()
->getScheme();
return $configuration += [
'protocol' => $protocol,
'region' => 'us-east-1',
'endpoint' => NULL,
];
}