StorageService
in package
Storage service factory.
Returns S3StorageDriver when AWS_S3_BUCKET is configured, otherwise falls back to LocalStorageDriver. Supports test injection via setDriver().
Tags
Table of Contents
Properties
- $driver : StorageDriverInterface|null
Methods
- driver() : StorageDriverInterface
- Get the active storage driver.
- setDriver() : void
- Override the storage driver (for testing).
Properties
$driver
private
static StorageDriverInterface|null
$driver
= \null
Cached driver instance
Methods
driver()
Get the active storage driver.
public
static driver() : StorageDriverInterface
Return values
StorageDriverInterfacesetDriver()
Override the storage driver (for testing).
public
static setDriver(StorageDriverInterface|null $driver) : void
Parameters
- $driver : StorageDriverInterface|null
-
Driver instance, or null to reset