services:
  azure_client_service:
    class: MicrosoftAzure\Storage\Blob\BlobRestProxy
    factory: ['MicrosoftAzure\Storage\Blob\BlobRestProxy', 'createBlobService']
    arguments:
      $connectionString: 'DefaultEndpointsProtocol=https;AccountName=%env(string:AZURE_STORAGE_ACCOUNT_NAME)%;AccountKey=%env(string:AZURE_STORAGE_ACCOUNT_KEY)%;EndpointSuffix=core.windows.net'

  document_static_adapter:
    # See TorqAzureBlobStorageAdapter - we needed to modify their source slightly
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER)%'
      $prefix: 'pages'
  assets_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER_ASSETS)%'
      $prefix: 'assets'
  asset_cache_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER_ASSETS)%'
      $prefix: 'asset-cache'
  thumbnail_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER_ASSETS)%'
      $prefix: 'thumbnails'
  version_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER)%'
      $prefix: 'versions'
  recycle_bin_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER)%'
      $prefix: 'recyclebin'
  admin_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER)%'
      $prefix: 'admin'
  email_log_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER)%'
      $prefix: 'email'
  tmp_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER)%'
      $prefix: 'tmp'
  application_log_adapter:
    class: 'TorqIT\FlysystemAzureBundle\TorqAzureBlobStorageAdapter'
    arguments:
      $client: '@azure_client_service'
      $container: '%env(string:AZURE_STORAGE_ACCOUNT_CONTAINER)%'
      $prefix: 'application-log'

