Skip to content

FilesystemPlugin

Registers the filesystem subsystem: filesystem.* setting defaults (local disk rooted at storage/app, out of the box) and the FilesystemManager service app code depends on.

A cloud backend (e.g. quioteframework/filesystem-s3) registers its own alias into FilesystemDriverRegistry from its own plugin — this class does not need to change for that.

Like every plugin, this is opt-in via the plugins config key — even though it lives in core, an app must list it to get FilesystemManager.

final class FilesystemPlugin implements PluginInterface

ImplementsPluginInterface
SourceFilesystemPlugin.php
MethodDescription
register(PluginRegistrar $registrar): voidPublishes the filesystem.default_disk and filesystem.disks.local.root defaults and binds FilesystemConfig, LocalFilesystemAdapter and FilesystemManager.

public function register(PluginRegistrar $registrar): void

Publishes the filesystem.default_disk and filesystem.disks.local.root defaults and binds FilesystemConfig, LocalFilesystemAdapter and FilesystemManager.

The adapter and the manager are registered as factories that read FilesystemConfig out of the container when first resolved, so an app’s own config overrides apply even though the defaults are declared here.

ParameterTypeDescription
$registrarPluginRegistrar