Documentation
Filesystem Azure Bridge
The Filesystem Azure Bridge is a bridge that allows you to use the Azure Blob Storage as a filesystem in your application.
Installation
composer require flow-php/filesystem-azure-bridge
Usage
[!NOTE]
Since the Azure SDK is not providing any http client or factories, you need to install them manually. The following example uses thephp-http/discovery
package to find the factories in your project existing dependencies. Use below links to find the implementations for client and the factories:
<?php
use Http\Discovery\Psr17FactoryDiscovery;
use Http\Discovery\Psr18ClientDiscovery;
use function Flow\Azure\SDK\DSL\azure_blob_service;
use function Flow\Azure\SDK\DSL\azure_blob_service_config;
use function Flow\Azure\SDK\DSL\azure_http_factory;
use function Flow\Azure\SDK\DSL\azure_shared_key_authorization_factory;
use function Flow\Azure\SDK\DSL\azure_url_factory;
$sdk = azure_blob_service(
$config = azure_blob_service_config($account, $container),
Psr18ClientDiscovery::find(),
azure_http_factory(Psr17FactoryDiscovery::findRequestFactory(), Psr17FactoryDiscovery::findStreamFactory()),
azure_url_factory(),
azure_shared_key_authorization_factory($config, $accountKey),
$logger
);
$fstab = new FilesystemTable