protected function buildFilesystem(Container $app, array $parameters)
    {
        $adapter = new \ReflectionClass($parameters['adapter']);
        $filesystem = new Filesystem($adapter->newInstanceArgs($parameters['args']), $this->getConfig($parameters));

        foreach ($app['flysystem.plugins'] as $plugin) {
            $plugin->setFilesystem($filesystem);
            $filesystem->addPlugin($plugin);
        }

        return $filesystem;
    }
protected function buildFilesystem(Container $app, array $parameters)
    {
        $adapter = new \ReflectionClass($parameters['adapter']);
        $filesystem = new Filesystem($adapter->newInstanceArgs($parameters['args']), $this->getConfig($parameters));

        foreach ($app['flysystem.plugins'] as $plugin) {
            $plugin->setFilesystem($filesystem);
            $filesystem->addPlugin($plugin);
        }

        return $filesystem;
    }
protected function buildFilesystem ( Container $ app , array $ parameters ) { $ adapter = new \ ReflectionClass ( $ parameters [ 'adapter' ] ) ; $ filesystem = new Filesystem ( $ adapter -> newInstanceArgs ( $ parameters [ 'args' ] ) , $ this -> getConfig ( $ parameters ) ) ; foreach ( $ app [ 'flysystem.plugins' ] as $ plugin ) { $ plugin -> setFilesystem ( $ filesystem ) ; $ filesystem -> addPlugin ( $ plugin ) ; } return $ filesystem ; }
Instantiate an adapter and wrap it in a filesystem.

@param array $parameters Array containing the adapter classname and arguments that need to be passed into it.

@return Filesystem
Instantiate an adapter and wrap it in a filesystem .