Skip to content

Adapter for phpleague/flysystem using our Static project

Notifications You must be signed in to change notification settings

cospirit/flysystem-arstatic

Repository files navigation

CoSpirit Connect

flysystem-arstatic CircleCI

This is an HTTP client based on cURL to consume Static API

Development

Requirements

Install Docker as described in the Docker section of the Start Guide.

Installation

Check the Start guide of the documentation for base initialization.

Initialize project

    make development@install

Usage (with Docker)

Install the application :

    make development@install

Restart the docker compose service :

    make development@restart

Remove and clean docker containers :

    make development@down

Tests

    make test@phpunit

Usage

use CoSpirit\Flysystem\Adapter\ArStatic;
use League\Flysystem\Filesystem;

$adapter = new ArStatic($apiUrl);
$filesystem = new Filesystem($adapter);

Implemented methods

Write

$filesystem->write($slug, file_get_contents($tmpName));

Read

$filesystem->read($slug);

Has

$filesystem->has($slug);

Delete

$filesystem->delete($slug);