biigle / flysystem-elements
Flysystem adapter for the ELEMENTS media asset management system (read-only).
v2.4
2022-05-04 08:15 UTC
Requires
- guzzlehttp/guzzle: ^6.0|^7.3
- league/flysystem: ^3.0
- league/mime-type-detection: ^1.0
Requires (Dev)
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.5
README
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.