\Omega\Filesystem FilesystemMapInterface

Interface FilesystemMapInterface.

The FilesystemMapInterface defines a contract for managing and retrieving filesystem instances by their associated names. It provides methods to check for the existence of a filesystem and to retrieve it when needed. This interface is useful in scenarios where multiple filesystems are utilized, allowing for seamless access and management without the need for complex logic. Implementing classes are responsible for maintaining a mapping between filesystem names and their corresponding instances, enabling efficient interaction with various filesystems in a unified manner.

Summary

Methods
Constants
has()
get()
No public constants found

Methods

has()

has(string  $name) : bool

Indicates whether there is a filesystem registered for the specified name.

Parameters

string $name

The name of the filesystem to check.

Returns

bool —

TRUE if a filesystem is registered for the specified name, FALSE otherwise.

get()

get(string  $name) : \Omega\Filesystem\FilesystemInterface

Returns the filesystem registered for the specified name.

Parameters

string $name

The name of the filesystem to retrieve.

Throws

\InvalidArgumentException

When there is no filesystem registered for the specified name.

Returns

\Omega\Filesystem\FilesystemInterface —

The filesystem registered for the specified name.