use Symfony\Component\OptionsResolver\OptionsResolver;
class GoogleStorageFactory implements AdapterFactoryInterface
{ /**
* @return GoogleStorageAdapter
*/
public function create(array
$config) { $options =
$this->
resolveStorageConfig($config);
$storageClient =
new StorageClient([ 'projectId' =>
$options['projectId'
],
'keyFilePath' =>
$options['keyFilePath'
],
]);
$bucket =
$storageClient->
bucket($options['bucket'
]);
return new GoogleStorageAdapter($storageClient,
$bucket,
$options['root'
]);
} /**
* @return string
*/