add conveince function to wrap all storages

This commit is contained in:
Robin Appelman 2013-07-25 16:01:05 +02:00
parent d042c8f166
commit 5209cff371
1 changed files with 12 additions and 0 deletions

View File

@ -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();