Add a filesystem map service

This commit is contained in:
ornicar
2011-06-18 11:49:55 -07:00
parent 6db8231e09
commit 3a68f9080b
4 changed files with 67 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ Documentation is available the [official page of Gaufrette][gaufrette-homepage].
Installation
------------
## Prérequisites
## Prerequisites
As this bundle is an integration for Symfony of the [Gaufrette][gaufrette-homepage] library, it requires you to first install [Gaufrette][gaufrette-homepage] in a Symfony project.
@@ -104,6 +104,18 @@ Each defined filesystem must have an `adapter` with the key of an adapter as val
The filesystem defined above with result in a service with id `gaufrette.bar_filesystem`.
The `alias` parameter permits to also defines an alias for it.
The filesystem map
------------------
You can access to all declared filesystems through the map service.
In the previous exemple, we declared a `bar` filesystem:
``` php
$container->get('knplabs_gaufrette.filesystem_map')->get('bar');
```
Returns the instance of `Gaufrette\Filesystem` for `bar`.
Adapters Reference
------------------