class FilesystemManager implements Factory mixin Filesystem

Properties

protected Application $app

The application instance.

protected array $disks

The array of resolved filesystem drivers.

protected array $customCreators

The registered custom driver creators.

Methods

void
__construct(Application $app)

Create a new filesystem manager instance.

drive(string $name = null)

Get a filesystem instance.

disk(string $name = null)

Get a filesystem instance.

cloud()

Get a default cloud filesystem instance.

get(string $name)

Attempt to get the disk from the local cache.

resolve(string $name)

Resolve the given disk.

callCustomCreator(array $config)

Call a custom driver creator.

createLocalDriver(array $config)

Create an instance of the local driver.

createFtpDriver(array $config)

Create an instance of the ftp driver.

createS3Driver(array $config)

Create an instance of the Amazon S3 driver.

array
formatS3Config(array $config)

Format the given S3 configuration with the default options.

createRackspaceDriver(array $config)

Create an instance of the Rackspace driver.

Container
getRackspaceContainer(Rackspace $client, array $config)

Get the Rackspace Cloud Files container.

FlysystemInterface
createFlysystem(AdapterInterface $adapter, array $config)

Create a Flysystem instance with the given adapter.

adapt(FilesystemInterface $filesystem)

Adapt the filesystem implementation.

void
set(string $name, mixed $disk)

Set the given disk instance.

array
getConfig(string $name)

Get the filesystem connection configuration.

string
getDefaultDriver()

Get the default driver name.

string
getDefaultCloudDriver()

Get the default cloud driver name.

$this
extend(string $driver, Closure $callback)

Register a custom driver creator Closure.

mixed
__call(string $method, array $parameters)

Dynamically call the default driver instance.

Details

at line 51
void __construct(Application $app)

Create a new filesystem manager instance.

Parameters

Application $app

Return Value

void

at line 62
Filesystem drive(string $name = null)

Get a filesystem instance.

Parameters

string $name

Return Value

Filesystem

at line 73
Filesystem disk(string $name = null)

Get a filesystem instance.

Parameters

string $name

Return Value

Filesystem

at line 85
Filesystem cloud()

Get a default cloud filesystem instance.

Return Value

Filesystem

at line 98
protected Filesystem get(string $name)

Attempt to get the disk from the local cache.

Parameters

string $name

Return Value

Filesystem

at line 111
protected Filesystem resolve(string $name)

Resolve the given disk.

Parameters

string $name

Return Value

Filesystem

Exceptions

InvalidArgumentException

at line 134
protected Filesystem callCustomCreator(array $config)

Call a custom driver creator.

Parameters

array $config

Return Value

Filesystem

at line 151
Filesystem createLocalDriver(array $config)

Create an instance of the local driver.

Parameters

array $config

Return Value

Filesystem

at line 170
Filesystem createFtpDriver(array $config)

Create an instance of the ftp driver.

Parameters

array $config

Return Value

Filesystem

at line 187
Cloud createS3Driver(array $config)

Create an instance of the Amazon S3 driver.

Parameters

array $config

Return Value

Cloud

at line 206
protected array formatS3Config(array $config)

Format the given S3 configuration with the default options.

Parameters

array $config

Return Value

array

at line 223
Cloud createRackspaceDriver(array $config)

Create an instance of the Rackspace driver.

Parameters

array $config

Return Value

Cloud

at line 243
protected Container getRackspaceContainer(Rackspace $client, array $config)

Get the Rackspace Cloud Files container.

Parameters

Rackspace $client
array $config

Return Value

Container

at line 259
protected FlysystemInterface createFlysystem(AdapterInterface $adapter, array $config)

Create a Flysystem instance with the given adapter.

Parameters

AdapterInterface $adapter
array $config

Return Value

FlysystemInterface

at line 272
protected Filesystem adapt(FilesystemInterface $filesystem)

Adapt the filesystem implementation.

Parameters

FilesystemInterface $filesystem

Return Value

Filesystem

at line 284
void set(string $name, mixed $disk)

Set the given disk instance.

Parameters

string $name
mixed $disk

Return Value

void

at line 295
protected array getConfig(string $name)

Get the filesystem connection configuration.

Parameters

string $name

Return Value

array

at line 305
string getDefaultDriver()

Get the default driver name.

Return Value

string

at line 315
string getDefaultCloudDriver()

Get the default cloud driver name.

Return Value

string

at line 327
$this extend(string $driver, Closure $callback)

Register a custom driver creator Closure.

Parameters

string $driver
Closure $callback

Return Value

$this

at line 341
mixed __call(string $method, array $parameters)

Dynamically call the default driver instance.

Parameters

string $method
array $parameters

Return Value

mixed