biigle/flysystem-elements

Flysystem adapter for the ELEMENTS media asset management system (read-only).

v2.4 2022-05-04 08:15 UTC

This package is auto-updated.

Last update: 2024-11-04 13:48:18 UTC


README

Tests

Flysystem adapter for the ELEMENTS media asset management system (read-only).

Installation

composer require biigle/flysystem-elements

Usage

use Biigle\Flysystem\Elements\ElementsAdapter;
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://elements.example.com',
    'headers' => [
        'Authorization' => 'Bearer my-elements-api-token',
    ],
]);
$adapter = new ElementsAdapter($client);

$exists = $adapter->fileExists('.projects/path/to/file.jpg');
var_dump($exists);
// bool(true);

Supported methods are:

  • fileExists
  • directoryExists
  • read
  • readStream
  • visibility
  • mimeType
  • lastModified
  • fileSize
  • listContents

All other (non-reading) methods throw an exception.