2017 © Pedro Peláez
 

library flysystem-gaufrette

Gaufrette adapter for Flysystem

image

jenko/flysystem-gaufrette

Gaufrette adapter for Flysystem

  • Friday, March 31, 2017
  • by jenkoian
  • Repository
  • 2 Watchers
  • 3 Stars
  • 2,262 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Flysystem Adapter for Gaufrette

Build Status Coverage Status Quality Score Software License, (*1)

Installation

composer require jenko/flysystem-gaufrette

Usage

Basic usage:, (*2)

use Jenko\Flysystem\GaufretteAdapter;
use Gaufrette\Adapter\Local;

$adapter = new GaufretteAdapter(
    new Local(__DIR__ . '/path/to/files');
); 

$filesystem = new Filesystem($adapter);

Advanced usage:, (*3)

use Jenko\Flysystem\GaufretteAdapter;
use Gaufrette\Adapter\Local;
use Gaufrette\Adapter\Flysystem;

// Hadouken!
$adapter = new GaufretteAdapter(
    new Flysystem(
        new GaufretteAdapter(
            new Flysystem(
                new GaufretteAdapter(
                    new Flysystem(
                        new GaufretteAdapter(
                            new Local(
                                __DIR__ . '/path/to/files'
                            )
                        )
                    )
                )
            )
        )
    )
);

$filesystem = new Filesystem($adapter);

Wait, what?

Gaufrette added a Flysystem adapter so it made sense to reciprocate the love and have an adapter going in the other direction. Although it does feel a little yo dawg it is useful. For example if you have a codebase which is quite coupled to the flysystem API (legacy app, obv you wouldn't have done this) but wish to make a switch to Gaufrette, this will allow you to do so without having to go through your codebase changing all calls to the old API. For more information on actual usage, see this blog post: http://jenko.me/legacy/2017/03/07/from-gaufrette-to-flysystem-and-back-again/, (*4)

It also allows you to construct fun, bi-directional, hadouken-esque nesting as seen in the advanced usage example above., (*5)

Unsupported methods

Flysystem has a few methods which Gaufrette doesn't quite support, these are listed below:, (*6)

  • update
  • updateStream
  • copy
  • createDir
  • getVisibility
  • setVisibility

The following methods are only supported for Gaufrette adapters implementing MetadataSupporter:, (*7)

  • getMetadata

The following methods are only supported for Gaufrette adapters implementing SizeCalculator:, (*8)

  • getSize

The following methods are only supported for Gaufrette adapters implementing MimeTypeProvider:, (*9)

  • getMimetype

The Versions

31/03 2017

dev-add-security-checker

dev-add-security-checker

Gaufrette adapter for Flysystem

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ian Jenkins

07/03 2017

dev-master

9999999-dev

Gaufrette adapter for Flysystem

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ian Jenkins

26/01 2017

v1.0.0

1.0.0.0

Gaufrette adapter for Flysystem

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ian Jenkins