All Projects → KnpLabs → Knpgaufrettebundle

KnpLabs / Knpgaufrettebundle

Licence: mit
Easily use Gaufrette in your Symfony projects.

Projects that are alternatives of or similar to Knpgaufrettebundle

Sensiogeneratorbundle
Generates Symfony bundles, entities, forms, CRUD, and more...
Stars: ✭ 634 (-1.86%)
Mutual labels:  bundle, symfony, symfony-bundle
Liipfunctionaltestbundle
Some helper classes for writing functional tests in Symfony
Stars: ✭ 604 (-6.5%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonatablockbundle
Symfony SonataBlockBundle
Stars: ✭ 368 (-43.03%)
Mutual labels:  bundle, symfony, symfony-bundle
Doctrinebundle
Symfony Bundle for Doctrine ORM and DBAL
Stars: ✭ 4,225 (+554.02%)
Mutual labels:  bundle, symfony, symfony-bundle
Sensiodistributionbundle
Base bundle for Symfony Distributions
Stars: ✭ 501 (-22.45%)
Mutual labels:  bundle, symfony, symfony-bundle
Doctrineenumbundle
📦 Provides support of ENUM type for Doctrine in Symfony applications.
Stars: ✭ 410 (-36.53%)
Mutual labels:  bundle, symfony, symfony-bundle
Phone Number Bundle
Integrates libphonenumber into your Symfony2-Symfony4 application
Stars: ✭ 446 (-30.96%)
Mutual labels:  bundle, symfony, symfony-bundle
Lexiktranslationbundle
This Symfony2 bundle allow to import translation files content into the database and provide a GUI to edit translations.
Stars: ✭ 347 (-46.28%)
Mutual labels:  bundle, symfony, symfony-bundle
Foscommentbundle
Threaded comments for Symfony
Stars: ✭ 451 (-30.19%)
Mutual labels:  bundle, symfony, symfony-bundle
Easy Deploy Bundle
The easiest way to deploy your Symfony applications
Stars: ✭ 446 (-30.96%)
Mutual labels:  bundle, symfony, symfony-bundle
Jwtrefreshtokenbundle
Implements a Refresh Token system over Json Web Tokens in Symfony
Stars: ✭ 425 (-34.21%)
Mutual labels:  bundle, symfony, symfony-bundle
Sentry Symfony
The official Symfony SDK for Sentry (sentry.io)
Stars: ✭ 515 (-20.28%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonatadoctrineormadminbundle
Integrate Doctrine ORM into the SonataAdminBundle
Stars: ✭ 400 (-38.08%)
Mutual labels:  bundle, symfony, symfony-bundle
Sonatamediabundle
Symfony SonataMediaBundle
Stars: ✭ 415 (-35.76%)
Mutual labels:  bundle, symfony, symfony-bundle
Lexikformfilterbundle
This Symfony bundle aim to provide classes to build some form filters and then build a doctrine query from this form filter.
Stars: ✭ 360 (-44.27%)
Mutual labels:  bundle, symfony, symfony-bundle
Assetic Bundle
[DEPRECATED] This was the recommended way to manage web assets in Symfony 2 applications. Newer Symfony applications should use Webpack Encore.
Stars: ✭ 370 (-42.72%)
Mutual labels:  bundle, symfony, symfony-bundle
Easyadminbundle
EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.
Stars: ✭ 3,391 (+424.92%)
Mutual labels:  bundle, symfony, symfony-bundle
Doctrinemigrationsbundle
Symfony integration for the doctrine/migrations library
Stars: ✭ 3,782 (+485.45%)
Mutual labels:  bundle, symfony, symfony-bundle
Exporter
Lightweight Exporter library
Stars: ✭ 384 (-40.56%)
Mutual labels:  bundle, symfony, symfony-bundle
Liipmonitorbundle
Integrates the LiipMonitor library into Symfony
Stars: ✭ 445 (-31.11%)
Mutual labels:  bundle, symfony, symfony-bundle

Gaufrette Bundle

Build Status

Provides a Gaufrette integration for your Symfony projects.

About Gaufrette

Gaufrette is a PHP library providing a filesystem abstraction layer. This abstraction layer allows you to develop applications without needing to know where all their media files will be stored or how.

Documentation is available the official page of Gaufrette.

Installation

Prerequisites

As this bundle is an integration for Symfony of the Gaufrette library, it requires you to first install Gaufrette in your project.

Note that, you need to install separately the adapters you want to use. You can find more details about these packages here, and the full list adapters on packagist.

With composer

composer require knplabs/knp-gaufrette-bundle

Register the bundle

You must register the bundle in your kernel:

<?php

return [
    // ...
    Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
];

Configuration

The Gaufrette bundle allows you to declare your filesystems as services without having to reach into the famous "Service Container". Indeed, you can do it with the configuration!

The configuration of the Gaufrette bundle is divided into two parts: the adapters and the filesystems.

Configuring the Adapters

# config/packages/knp_gaufrette.yaml
knp_gaufrette:
    adapters:
        foo:
            local:
                directory: /path/to/my/filesystem

The defined adapters are then used to create the filesystems.

You can use on of these adapters:

Configuring the Filesystems

# config/packages/knp_gaufrette.yaml
knp_gaufrette:
    adapters:
        # ...
    filesystems:
        bar:
            adapter:    foo
            alias:      foo_filesystem

Each defined filesystem must have an adapter with its value set to an adapter's key. The filesystem defined above will result in a service with id gaufrette.bar_filesystem. The alias parameter allows us to define an alias for it (foo_filesystem in this case).

The filesystem map

You can access all declared filesystems through the map service. In the previous exemple, we declared a bar filesystem:

$container->get('knp_gaufrette.filesystem_map')->get('bar');

Returns the bar instance of Gaufrette\Filesystem.

Use cases

Check out basic examples of the library.

Maintainers

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].