league/flysystem-azure

此包已被弃用,不再维护。作者建议使用 league/flysystem-azure-blob-storage 包。

Windows Azure 的 Flysystem 适配器

1.0.4 2016-07-10 19:08 UTC

This package is auto-updated.

Last update: 2022-02-01 12:43:04 UTC


README

Author Build Status Coverage Status Quality Score Software License

这是 Windows Azure 的 Flysystem 适配器。

首先确保将 pear 仓库添加到您的 composer.json 文件中。

"repositories": [
    {
        "type": "pear",
        "url": "http://pear.php.net"
    }
],

然后使用以下命令安装适配器的最新版本

composer require league/flysystem-azure

引导

<?php
use MicrosoftAzure\Storage\Common\ServicesBuilder;
use League\Flysystem\Filesystem;
use League\Flysystem\Azure\AzureAdapter;

$endpoint = sprintf('DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s', 'account-name', 'api-key');
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($endpoint);

$filesystem = new Filesystem(new AzureAdapter($blobRestProxy, 'my-container'));