2017 © Pedro PelĂĄez
 

library storage-factory

This library is a factory to instantiate storage adapters based on the Flysystem or Gaufrette library. It can deal with both! Migrating from one lib to another should be easy this way.

image

burzum/storage-factory

This library is a factory to instantiate storage adapters based on the Flysystem or Gaufrette library. It can deal with both! Migrating from one lib to another should be easy this way.

  • Sunday, January 17, 2016
  • by burzum
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9,175 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

Storage Factory Library for Flysystem and Gaufrette

Software License Build Status Coverage Status, (*1)

Requirements

  • PHP 5.4+

At least one of both:, (*2)

  • Gaufrette Library
  • Flysystem Library

How to use it

Configure the adapter instances:, (*3)

$basePath = '/your/base/path';
StorageFactory::config('LocalGaufrette', array(
    'adapterOptions' => [$basePath, true],
    'adapterClass' => '\Gaufrette\Adapter\Local',
    'class' => '\Gaufrette\Filesystem'
));
StorageFactory::config('LocalFlysystem', array(
    'adapterOptions' => [$basePath],
    'engine' => StorageFactory::FLYSYSTEM_ENGINE,
    'adapterClass' => 'Local',
));

And get instances of the adapters as you need them., (*4)

$flysystemLocalFSAdapter = StorageFactory::get('LocalGaufrette');
$gaufretteLocalFSAdapter = StorageFactory::get('LocalFlysystem');

Flush or renews adapter objects:, (*5)

// Flushes a specific adapter based on the config name
StorageFactory::flush('LocalGaufrette');
// Flushes ALL adapters
StorageFactory::flush();

// Renews an adapter, set second arg to true
StorageFactory::get('LocalGaufrette', true);

Support

For bugs and feature requests, please use the issues section of this repository., (*6)

Contributing

To contribute to this repository please follow a few basic rules., (*7)

License

Copyright 2012 - 2015, Florian KrÀmer, (*8)

Licensed under The MIT License Redistributions of files must retain the above copyright notice., (*9)

The Versions

17/01 2016

dev-master

9999999-dev http://github.com/burzum/storage-factory

This library is a factory to instantiate storage adapters based on the Flysystem or Gaufrette library. It can deal with both! Migrating from one lib to another should be easy this way.

  Sources   Download

MIT

The Requires

 

The Development Requires

file filesystem s3 sftp storage media abstraction ftp dropbox

17/01 2016

1.0.0-alpha1

1.0.0.0-alpha1 http://github.com/burzum/storage-factory

This library is a factory to instantiate storage adapters based on the Flysystem or Gaufrette library. It can deal with both! Migrating from one lib to another should be easy this way.

  Sources   Download

MIT

The Requires

 

The Development Requires

file filesystem s3 sftp storage media abstraction ftp dropbox

28/08 2015

dev-develop

dev-develop http://github.com/burzum/storage-factory

This library is a factory to instantiate storage adapters based on the Flysystem or Gaufrette library. It can deal with both! Migrating from one lib to another should be easy this way.

  Sources   Download

MIT

The Requires

 

The Development Requires

file filesystem s3 sftp storage media abstraction ftp dropbox