Tiger_Media_Storage

@api

Tiger_Media_Storage — resolves a configured storage disk to its adapter.

Disks are declared in config (media.disks.<name>.adapter + settings) and referenced by a media row's disk. Tiger_Media_Storage::disk() returns the (memoized) adapter for a disk, defaulting to media.default_disk. Adding a backend is a new Tiger_Media_Storage_Interface class + a case here.

Methods

disk()

disk($name = null)

The adapter for a disk (default disk when null).

  • $name ?string — the disk name, or null for the default disk

Returns Tiger_Media_Storage_Interface — the memoized adapter for the disk

defaultDisk()

defaultDisk()

The configured default disk name (local if unset).

Returns string — the default disk name

reset()

reset()

Reset the memo (tests / after a config change).