helios-ag / FMElfinderBundle

:file_folder: ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
MIT License
275 stars 128 forks source link

Support implementation of a custom driver class #449

Closed Ahummeling closed 2 years ago

Ahummeling commented 2 years ago

Short description of what this feature will allow to do: This feature would support the use of a custom driver class to be used in combination with a custom adapter. Specifically, allow someone to write a driver with Flysystem v2 in mind, which can then be used to instantiate a Filesystem.

Example of how to use this feature You'd have to write your own driver class where the name of the driver matches: 'elFinderVolume'.(isset($o['driver']) ? $o['driver'] : '') Where $o['driver'] is the value given as driver in the configuration of the bundle. So for Flysystem, your class would have to be called elFinderVolumeFlysystem. This class would have to live in the root namespace and you'd have to make sure this class gets loaded, (so in 99% of cases, make sure composer autoloads the file to make the class available). This class would have to extend from elFinderVolumeDriver.

I've submitted a pull request to implement this feature: #448 . If there's anything wrong with it, or there are errors in my assumptions here, I would love to learn about it.