Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update filesystem_create.md #289

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions doc/filesystem_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,6 @@ class MyService
and instead you can automatically inject your filesystems by **providing the exact same type-hint as above**, and
replace `acme` with the name of your filesystem. Thanks to the ``ContainerBuilder::registerAliasForArgument()`` method!

## Use the Mount Manager
bytehead marked this conversation as resolved.
Show resolved Hide resolved

If you provided a mount prefix, you can also access the filesystem through the [MountManager](https://github.com/thephpleague/flysystem/blob/master/src/MountManager.php).

```yml
oneup_flysystem:
adapters:
myadapter:
local:
location: "%kernel.root_dir%/cache"

filesystems:
myfilesystem:
adapter: myadapter
mount: prefix
```

```php
$filesystem = $container->get('oneup_flysystem.mount_manager')->getFilesystem('prefix');
```

Details on the usage of the MountManager can be found in the [Flysystem documentation](https://flysystem.thephpleague.com/docs/advanced/mount-manager/).

## Add caching

In version 1.x of Flysystem you could provide a cache per each adapter. [The cached adapter was not ported to V2 of Flysystem](https://flysystem.thephpleague.com/docs/upgrade-from-1.x/#miscellaneous-changes).
Expand Down
Loading