MountManager->getFilesystem() method not exists
fernandosngular opened this issue · 3 comments
fernandosngular commented
Bug Report
When i try use $this->mountManager->getFilesystem('prefix') method, from my service... it not is working.
Q | A |
---|---|
BC Break | yes |
Version | 4.4.2 |
How to reproduce
- Inject mountManager for your service in the yml (in controller it not is working)
- Write code: $this->mountManager->getFilesystem('prefix')
- It not is working, if you see in mountManager class... filesystem is private methods and not way for get this information.
bytehead commented
The mount manager actually comes from Flysystem: https://flysystem.thephpleague.com/docs/advanced/mount-manager/
I can't see a getFilesystem
method there.
bytehead commented
I see, the documentation is wrong here.
But you should be able to use your suffix for the operations:
// Read from FTP
$contents = $manager->read('ftp://some/file.txt');
// And write to local
$manager->write('local://put/it/here.txt', $contents);
// Untested, but I would give a try for you prefixed one
$manager->write('prefix://put/it/here.txt', $contents);
fernandosngular commented
I see, but i think that it is confused with prefix for my project... so, i am going to inject my multiples filesystem configurations directly.
Thanks