Giter Site home page Giter Site logo

storage-factory's Introduction

Storage Factory Library for Flysystem and Gaufrette

Software License Build Status Coverage Status

Requirements

  • PHP 5.4+

At least one of both:

  • Gaufrette Library
  • Flysystem Library

How to use it

Configure the adapter instances:

$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.

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

Flush or renews adapter objects:

// 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.

Contributing

To contribute to this repository please follow a few basic rules.

License

Copyright 2012 - 2015, Florian Krämer

Licensed under The MIT License Redistributions of files must retain the above copyright notice.

storage-factory's People

Contributors

burzum avatar

Stargazers

Kalle Alberg avatar

Watchers

 avatar James Cloos avatar

storage-factory's Issues

Release please

Hi,

There is no any release in this repository, would be nice to have at least 1.0.0 version.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.