add conveince function to wrap all storages
This commit is contained in:
parent
d042c8f166
commit
5209cff371
|
@ -149,6 +149,18 @@ class Filesystem {
|
|||
*/
|
||||
private static $loader;
|
||||
|
||||
/**
|
||||
* @param callable $wrapper
|
||||
*/
|
||||
public static function addStorageWrapper($wrapper) {
|
||||
self::getLoader()->addStorageWrapper($wrapper);
|
||||
|
||||
$mounts = self::getMountManager()->getAll();
|
||||
foreach ($mounts as $mount) {
|
||||
$mount->wrapStorage($wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getLoader() {
|
||||
if (!self::$loader) {
|
||||
self::$loader = new Loader();
|
||||
|
|
Loading…
Reference in New Issue