protected onCreate ( mixed[] $config = [] ) : League\Flysystem\AdapterInterface | ||
$config | mixed[] | |
return | League\Flysystem\AdapterInterface |
protected function onCreate($config = [])
{
$client = $this->getClient();
$class = $this->getClass();
$client = new $client($this->param($config, 'identityEndpoint'), $this->params($config));
$store = $client->objectStoreService($this->param($config, 'serviceName'), $this->param($config, 'serviceRegion'), $this->param($config, 'serviceUrlType'));
return new $class($store->getContainer('flysystem'));
}