\Charcoal\App\ServiceProviderFilesystemServiceProvider

Summary

Methods
Properties
Constants
register()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
createConnection()
createLocalAdapter()
createS3Adapter()
createDropboxAdapter()
createFtpAdapter()
createSftpAdapter()
createMemoryAdapter()
createNullAdapter()
No private properties found
N/A

Methods

register()

register(\Pimple\Container  $container) : void

Parameters

\Pimple\Container $container

Pimple DI Container.

createConnection()

createConnection(array  $config) : \League\Flysystem\Filesystem

Parameters

array $config

The driver (adapter) configuration.

Throws

\Exception

If the filesystem type is not defined in config.

\UnexpectedValueException

If the filesystem type is invalid / unsupported.

Returns

\League\Flysystem\Filesystem

createLocalAdapter()

createLocalAdapter(array  $config) : \League\Flysystem\Adapter\Local

Parameters

array $config

The driver (adapter) configuration.

Throws

\InvalidArgumentException

If the path is not defined in config.

Returns

\League\Flysystem\Adapter\Local

createS3Adapter()

createS3Adapter(array  $config) : \League\Flysystem\AwsS3v3\AwsS3Adapter

Parameters

array $config

The driver (adapter) configuration.

Throws

\InvalidArgumentException

If the key, secret or bucket is not defined in config.

Returns

\League\Flysystem\AwsS3v3\AwsS3Adapter

createDropboxAdapter()

createDropboxAdapter(array  $config) : \League\Flysystem\Adapter\Ftp

Parameters

array $config

The driver (adapter) configuration.

Throws

\InvalidArgumentException

If the token or secret is not defined in config.

Returns

\League\Flysystem\Adapter\Ftp

createFtpAdapter()

createFtpAdapter(array  $config) : \League\Flysystem\Adapter\Ftp

Parameters

array $config

The driver (adapter) configuration.

Throws

\InvalidArgumentException

If the host, username or password is not defined in config.

Returns

\League\Flysystem\Adapter\Ftp

createSftpAdapter()

createSftpAdapter(array  $config) : \League\Flysystem\Sftp\SftpAdapter

Parameters

array $config

The driver (adapter) configuration.

Throws

\InvalidArgumentException

If the host, username or password is not defined in config.

Returns

\League\Flysystem\Sftp\SftpAdapter

createMemoryAdapter()

createMemoryAdapter() : \League\Flysystem\Memory\MemoryAdapter

Returns

\League\Flysystem\Memory\MemoryAdapter

createNullAdapter()

createNullAdapter() : \League\Flysystem\Adapter\NullAdapter

Returns

\League\Flysystem\Adapter\NullAdapter