neutron/silex-filesystem-provider

A Silex Provider for Symfony Filesystem component

2.0.0 2017-12-14 10:21 UTC

This package is auto-updated.

Last update: 2024-10-25 06:29:33 UTC


README

#Silex Filesystem Service Provider

Build Status

This is a Silex Service Provider for Symfony Filesystem Component.

Installation

Add it using composer :

{
    "require": {
        "neutron/silex-filesystem-provider": "dev-master"
    }
}

Usage

use Silex\Application;
use Neutron\Silex\Provider\FilesystemServiceProvider;

$app = new Application();
// Register the filesystem
$app->register(new FilesystemServiceProvider());

// Just use it as any Silex service
if (!$app['filesystem']->exists('any-absolute-or-relative-path...')) {
	throw new \Namespace\PathNotFoundCustomException();
}

Information

Read more information about the Symfony Filesystem Component

License

This is released under the MIT license