class Filesystem implements ExtenderInterface

Methods

disk(string $name, callable|string $callback)

Declare a new filesystem disk.

driver(string $name, string $driverClass)

Register a new filesystem driver.

void
extend( Container $container, Extension|null $extension = null)

No description

Details

Filesystem disk(string $name, callable|string $callback)

Declare a new filesystem disk.

Disks represent storage locations, and are backed by storage drivers. Flarum core uses disks for storing assets and avatars. By default, the "local" driver will be used for disks. The "local" driver represents the filesystem where your Flarum installation is running. To declare a new disk, you must provide default configuration a "local" driver.

Parameters

string $name : The name of the disk.
callable|string $callback The callback can be a closure or an invokable class, and should accept: - \Flarum\Foundation\Paths $paths - \Flarum\Http\UrlGenerator $url The callable should return: - A Laravel disk config array, The `driver` key is not necessary for this array, and will be ignored.

Return Value

Filesystem

See also

https://laravel.com/docs/13.x/filesystem#configuration

Filesystem driver(string $name, string $driverClass)

Register a new filesystem driver.

Parameters

string $name : The name of the driver.
string $driverClass : The ::class attribute of the driver. Driver must implement `\Flarum\Filesystem\DriverInterface`.

Return Value

Filesystem

void extend( Container $container, Extension|null $extension = null)

Parameters

Container $container
Extension|null $extension

Return Value

void