2017 © Pedro Peláez
 

library slim-flysystem

Access your Slim 3 application file system using FlySystem.

image

projek-xyz/slim-flysystem

Access your Slim 3 application file system using FlySystem.

  • Thursday, October 13, 2016
  • by feryardiant
  • Repository
  • 2 Watchers
  • 2 Stars
  • 134 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Version Lisence Actions Status Coveralls Code Climate Maintainability SymfonyInsight Grade, (*1)

FlySystem Integration for Slim micro framework 3

Access your Slim 3 application file system using FlySystem., (*2)

Install

Via Composer, (*3)

$ composer require projek-xyz/slim-flysystem --prefer-dist

Requires Slim micro framework 3 and PHP 5.5.0 or newer., (*4)

Usage

// Create Slim app
$app = new \Slim\App();

// Fetch DI Container
$container = $app->getContainer();

// Register FlySystem helper:
// Option 1, using FlysystemProvider
$container->register(new \Projek\Slim\FlysystemProvider);

// Option 2, using Closure
$container['fs'] = function ($c) {
    $fs = new \Projek\Slim\Flysystem([
        'local' => [
            'path' => 'path/to/your/resources',
        ]
    ]);

    return $fs;
};

// Define named route
$app->get('/hello/{name}', function ($request, $response, $args) {
    // Read a file.
    $this->fs->read('path/to/file');

    return $response;
});

// Run app
$app->run();

NOTE: if you are using option 1 please make sure you already have $container['settings']['filesystem'] in your configuration file., (*5)

Custom functions

Description soon., (*6)

aFunction()

Description soon., (*7)

// ...

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*8)

License

This library is open-sourced software licensed under MIT license., (*9)

The Versions

13/10 2016

dev-master

9999999-dev http://www.projek.xyz/slim-flysystem

Access your Slim 3 application file system using FlySystem.

  Sources   Download

MIT

The Requires

 

The Development Requires

filesystem framework library slim microframework flysystem