Aller au contenu

omnidrive/azure Référence de l’API

Étage
Fournisseur · Omnidrive
Version
1.x
Suite de conformité
branchée, CI verte
Vérifié en réel
Vérifié en partie
Licence
MIT
composer require omnidrive/azure:1.x-dev

Lue dans les fichiers PHP du paquet au commit c985f5bb41f0 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Omnidrive\Azure

  • AzureDriveFactory class

    A container of Azure Blob Storage, through azure-oss/storage-blob-flysystem (the adapter The PHP League names in place of its own league/flysystem-azure-blob-storage, abandoned with Microsoft's retired SDK):

    3 options

Omnidrive\Azure

AzureDriveFactory class

final class AzureDriveFactory extends FlysystemDriveFactory AzureDriveFactory.php:34

A container of Azure Blob Storage, through azure-oss/storage-blob-flysystem (the adapter The PHP League names in place of its own league/flysystem-azure-blob-storage, abandoned with Microsoft's retired SDK):

(new AzureDriveFactory())->create(['container' => 'uploads', 'connection_string' => 'DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net']); (new AzureDriveFactory())->create(['container' => 'uploads', 'account_name' => 'example', 'account_key' => '...']);

Options: container (required); connection_string (the portal's, a shared key or a SAS) or account_name and account_key (with endpoint, the Blob service's address, for another cloud or Azurite - else https://<account>.blob.core.windows.net); prefix (every path under it); public_container (the container's blobs are readable anonymously: a file's own address is its public one); public_url (a CDN in front of it).

A public address is given only with public_container or public_url: the adapter's own, for a private container, is a SAS valid a thousand years, which this drive does not hand out as "public". temporaryUrl() signs a read-only SAS with the account key. Blob Storage keeps no visibility per file: reading or changing one is a DriveException. Nothing is sent until the first operation.

Options

OptionDefault
prefix''
public_containerfalse
containerrequired