class Storage extends Facade

Properties

static protected Container|null $app

The application instance being facaded.

from  Facade
static protected array $resolvedInstance

The resolved object instances.

from  Facade
static protected bool $cached

Indicates if the resolved instance should be cached.

from  Facade

Methods

static void
resolved(Closure $callback)

Run a Closure when the facade has been resolved.

from  Facade
static MockInterface|null
spy()

Convert the facade into a Mockery spy.

from  Facade
static MockInterface
partialMock()

Initiate a partial mock on the facade.

from  Facade
static CompositeExpectation|Expectation|HigherOrderMessage
shouldReceive()

Initiate a mock expectation on the facade.

from  Facade
static CompositeExpectation|Expectation|ExpectsHigherOrderMessage
expects()

Initiate a mock expectation on the facade.

from  Facade
static MockInterface
createFreshMockInstance()

Create a fresh mock instance for the given class.

from  Facade
static MockInterface
createMock()

Create a fresh mock instance for the given class.

from  Facade
static bool
isMock()

Determines whether a mock is set as the instance of the facade.

from  Facade
static string|null
getMockableClass()

Get the mockable class for the bound instance.

from  Facade
static void
swap(mixed $instance)

Hotswap the underlying instance behind the facade.

from  Facade
static bool
isFake()

Determines whether a "fake" has been set as the facade instance.

from  Facade
static mixed
getFacadeRoot()

Get the root object behind the facade.

from  Facade
static string
getFacadeAccessor()

Get the registered name of the component.

static mixed
resolveFacadeInstance(string $name)

Resolve the facade root instance from the container.

from  Facade
static void
clearResolvedInstance(string|null $name = null)

Clear a resolved facade instance.

from  Facade
static void
clearResolvedInstances()

Clear all of the resolved instances.

from  Facade
static Collection
defaultAliases()

Get the application default aliases.

from  Facade
static Container|null
getFacadeApplication()

Get the application instance behind the facade.

from  Facade
static void
setFacadeApplication(Container|null $app)

Set the application instance.

from  Facade
static mixed
__callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

from  Facade
fake(UnitEnum|string|null $disk = null, array $config = [])

Replace the given disk with a local testing disk.

persistentFake(UnitEnum|string|null $disk = null, array $config = [])

Replace the given disk with a persistent local testing disk.

static string
getRootPath(string $disk)

Get the root path of the given disk.

static array
buildDiskConfiguration(string $disk, array $config, string $root)

Assemble the configuration of the given disk.

static array
ignoredFacadeDocumenterMethods()

Get methods that should be excluded from the generated facade docblock.

addPoolableDriver(string $driver)

No description

static Filesystem
build(array|string $config, string|null $name = 'null')

No description

static Filesystem
createFtpDriver(array $config)

No description

static Cloud
createGcsDriver(array $config)

No description

static Filesystem
createLocalDriver(array $config, string $name = '\'local\'')

No description

static Filesystem
createReadThroughDriver(array $config, string $name = '\'read-through\'')

No description

static Cloud
createS3Driver(array $config)

No description

static Filesystem
createScopedDriver(array $config, string|null $name = 'null')

No description

static Filesystem
createSftpDriver(array $config)

No description

static Filesystem
disk(UnitEnum|string|null $name = 'null')

No description

static Filesystem
drive(UnitEnum|string|null $name = 'null')

No description

extend(string $driver, Closure $callback, bool $poolable = 'false')

No description

static void
flushState()

No description

forgetDisk(array|string $disk)

No description

static string
getDefaultDriver()

No description

static array
getPoolableDrivers()

No description

static Closure|null
getReleaseCallback(string $driver)

No description

static void
purge(string|null $name = 'null')

No description

removePoolableDriver(string $driver)

No description

set(string $name, mixed $disk)

No description

setApplication(Container $app)

No description

setPoolableDrivers(array $poolableDrivers)

No description

setReleaseCallback(string $driver, Closure $callback)

No description

static mixed
unless(mixed $value = 'null', null|callable $callback = 'null', null|callable $default = 'null')

No description

static mixed
when(mixed $value = 'null', null|callable $callback = 'null', null|callable $default = 'null')

No description

static string[]
allDirectories(string|null $directory = 'null')

No description

static string[]
allFiles(string|null $directory = 'null')

No description

static bool
append(string $path, string $data, string $separator = '"\\n"')

No description

static bool
copy(string $from, string $to)

No description

static bool
delete(array|string $paths)

No description

static bool
deleteDirectory(string $directory)

No description

static string[]
directories(string|null $directory = 'null', bool $recursive = 'false')

No description

static bool
exists(string $path)

No description

static string[]
files(string|null $directory = 'null', bool $recursive = 'false')

No description

static string|null
get(string $path)

No description

static string
getVisibility(string $path)

No description

static int
lastModified(string $path)

No description

static bool
makeDirectory(string $path)

No description

static bool
move(string $from, string $to)

No description

static string
path(string $path)

No description

static bool
prepend(string $path, string $data, string $separator = '"\\n"')

No description

static string|bool
put(string $path, UploadedFile $contents, mixed $options = '[]')

No description

static string|false
putFile(UploadedFile|string $path, UploadedFile|array|string|null $file = 'null', mixed $options = '[]')

No description

static string|false
putFileAs(UploadedFile|string $path, UploadedFile|array|string|null $file, array|string|null $name = 'null', mixed $options = '[]')

No description

static null|resource
readStream(string $path)

No description

static null|resource
readStreamRange(string $path, int|null $start, int|null $end)

No description

static bool
setVisibility(string $path, string $visibility)

No description

static int
size(string $path)

No description

static bool
writeStream(string $path, resource $resource, array $options = '[]')

No description

assertCount(string $path, int $count, bool $recursive = 'false')

No description

assertDirectoryEmpty(string $path)

No description

assertEmpty()

No description

assertExists(array|string $path, string|null $content = 'null')

No description

assertMissing(array|string $path)

No description

static void
buildTemporaryUploadUrlsUsing(Closure|null $callback)

No description

static void
buildTemporaryUrlsUsing(Closure|null $callback)

No description

static string|false
checksum(string $path, array $options = '[]')

No description

static bool
copyToDisk(UnitEnum|string $disk, string $from, string|null $to = 'null')

No description

static bool
directoryExists(string $path)

No description

static bool
directoryMissing(string $path)

No description

static StreamedResponse
download(string $path, string|null $name = 'null', array $headers = '[]')

No description

static bool
fileExists(string $path)

No description

static bool
fileMissing(string $path)

No description

static array
getConfig()

No description

static Image
image(string $path)

No description

static array|string|int|float|bool|null
json(string $path, int $flags = '0')

No description

static string|false
mimeType(string $path)

No description

static bool
missing(string $path)

No description

static bool
moveToDisk(UnitEnum|string $disk, string $from, string|null $to = 'null')

No description

static bool
providesTemporaryUploadUrls()

No description

static bool
providesTemporaryUrls()

No description

static StreamedResponse
response(string $path, string|null $name = 'null', array $headers = '[]', string $disposition = '\'inline\'')

No description

static Response
serve(Request $request, string $path, string|null $name = 'null', array $headers = '[]')

No description

static void
serveUsing(Closure|null $callback)

No description

static array|string
temporaryUploadUrl(string $path, DateTimeInterface $expiration, array $options = '[]')

No description

static string
temporaryUrl(string $path, DateTimeInterface $expiration, array $options = '[]')

No description

static string
url(string $path)

No description

static void
createDirectory(string $location, array $config = '[]')

No description

static int
fileSize(string $path)

No description

static bool
has(string $location)

No description

static string
read(string $location)

No description

static string
visibility(string $path)

No description

static void
write(string $location, string $contents, array $config = '[]')

No description

static PoolDefinition
getDefinition()

No description

static FilesystemOperator
getOperator()

No description

static string
getPoolName()

No description

static bool
invalidatePool()

No description

static mixed
withAdapter(Closure $callback)

No description

static mixed
withClient(Closure $callback)

No description

static mixed
withDriver(Closure $callback)

No description

Details

in Facade at line 61
static void resolved(Closure $callback)

Run a Closure when the facade has been resolved.

Boot-only. The callback is registered on the worker-global container and runs for every subsequent resolution of the facade accessor.

Parameters

Closure $callback

Return Value

void

in Facade at line 81
static MockInterface|null spy()

Convert the facade into a Mockery spy.

Tests only. Swaps the resolved facade instance for the worker lifetime.

Return Value

MockInterface|null

in Facade at line 99
static MockInterface partialMock()

Initiate a partial mock on the facade.

Tests only. Swaps the resolved facade instance for the worker lifetime.

Return Value

MockInterface

in Facade at line 115
static CompositeExpectation|Expectation|HigherOrderMessage shouldReceive()

Initiate a mock expectation on the facade.

Tests only. Swaps the resolved facade instance for the worker lifetime.

Return Value

CompositeExpectation|Expectation|HigherOrderMessage

in Facade at line 131
static CompositeExpectation|Expectation|ExpectsHigherOrderMessage expects()

Initiate a mock expectation on the facade.

Tests only. Swaps the resolved facade instance for the worker lifetime.

Return Value

CompositeExpectation|Expectation|ExpectsHigherOrderMessage

in Facade at line 145
static protected MockInterface createFreshMockInstance()

Create a fresh mock instance for the given class.

Return Value

MockInterface

in Facade at line 157
static protected MockInterface createMock()

Create a fresh mock instance for the given class.

Return Value

MockInterface

in Facade at line 167
static protected bool isMock()

Determines whether a mock is set as the instance of the facade.

Return Value

bool

in Facade at line 178
static protected string|null getMockableClass()

Get the mockable class for the bound instance.

Return Value

string|null

in Facade at line 194
static void swap(mixed $instance)

Hotswap the underlying instance behind the facade.

Tests only. Replaces the worker-wide resolved facade instance and container binding; runtime use races across coroutines and changes every subsequent facade call.

Parameters

mixed $instance

Return Value

void

in Facade at line 206
static bool isFake()

Determines whether a "fake" has been set as the facade instance.

Return Value

bool

in Facade at line 217
static mixed getFacadeRoot()

Get the root object behind the facade.

Return Value

mixed

at line 228
static protected string getFacadeAccessor()

Get the registered name of the component.

Return Value

string

in Facade at line 233
static protected mixed resolveFacadeInstance(string $name)

Resolve the facade root instance from the container.

Parameters

string $name

Return Value

mixed

in Facade at line 256
static void clearResolvedInstance(string|null $name = null)

Clear a resolved facade instance.

Boot or tests only. Clears a worker-wide facade cache entry; concurrent coroutines may still hold the previous resolved instance.

Parameters

string|null $name

Return Value

void

in Facade at line 267
static void clearResolvedInstances()

Clear all of the resolved instances.

Boot or tests only. Clears the worker-wide facade cache; concurrent coroutines may still hold previously resolved instances.

Return Value

void

in Facade at line 275
static Collection defaultAliases()

Get the application default aliases.

Return Value

Collection

in Facade at line 335
static Container|null getFacadeApplication()

Get the application instance behind the facade.

Return Value

Container|null

in Facade at line 346
static void setFacadeApplication(Container|null $app)

Set the application instance.

Boot or tests only. Replaces the worker-wide facade application reference; runtime use races across coroutines and breaks every facade lookup.

Parameters

Container|null $app

Return Value

void

in Facade at line 356
static mixed __callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

Parameters

string $method
array $args

Return Value

mixed

Exceptions

RuntimeException

at line 116
static LocalFilesystemAdapter fake(UnitEnum|string|null $disk = null, array $config = [])

Replace the given disk with a local testing disk.

Tests only. Swaps a cached filesystem disk on the shared filesystem manager for the worker lifetime.

Parameters

UnitEnum|string|null $disk
array $config

Return Value

LocalFilesystemAdapter

at line 157
static LocalFilesystemAdapter persistentFake(UnitEnum|string|null $disk = null, array $config = [])

Replace the given disk with a persistent local testing disk.

Tests only. Swaps a cached filesystem disk on the shared filesystem manager for the worker lifetime.

Parameters

UnitEnum|string|null $disk
array $config

Return Value

LocalFilesystemAdapter

at line 180
static protected string getRootPath(string $disk)

Get the root path of the given disk.

Parameters

string $disk

Return Value

string

at line 188
static protected array buildDiskConfiguration(string $disk, array $config, string $root)

Assemble the configuration of the given disk.

Parameters

string $disk
array $config
string $root

Return Value

array

at line 210
static protected array ignoredFacadeDocumenterMethods()

Get methods that should be excluded from the generated facade docblock.

The Storage facade documents methods supported by every disk plus the borrow-scoped accessors for pooled disks. Disk-specific raw accessors and adapter extensions remain available on compatible resolved disks.

Return Value

array

at line 108
static FilesystemManager addPoolableDriver(string $driver)

No description

Parameters

string $driver

Return Value

FilesystemManager

at line 108
static Filesystem build(array|string $config, string|null $name = 'null')

No description

Parameters

array|string $config
string|null $name

Return Value

Filesystem

at line 108
static Filesystem createFtpDriver(array $config)

No description

Parameters

array $config

Return Value

Filesystem

at line 108
static Cloud createGcsDriver(array $config)

No description

Parameters

array $config

Return Value

Cloud

at line 108
static Filesystem createLocalDriver(array $config, string $name = '\'local\'')

No description

Parameters

array $config
string $name

Return Value

Filesystem

at line 108
static Filesystem createReadThroughDriver(array $config, string $name = '\'read-through\'')

No description

Parameters

array $config
string $name

Return Value

Filesystem

at line 108
static Cloud createS3Driver(array $config)

No description

Parameters

array $config

Return Value

Cloud

at line 108
static Filesystem createScopedDriver(array $config, string|null $name = 'null')

No description

Parameters

array $config
string|null $name

Return Value

Filesystem

at line 108
static Filesystem createSftpDriver(array $config)

No description

Parameters

array $config

Return Value

Filesystem

at line 108
static Filesystem disk(UnitEnum|string|null $name = 'null')

No description

Parameters

UnitEnum|string|null $name

Return Value

Filesystem

at line 108
static Filesystem drive(UnitEnum|string|null $name = 'null')

No description

Parameters

UnitEnum|string|null $name

Return Value

Filesystem

at line 108
static FilesystemManager extend(string $driver, Closure $callback, bool $poolable = 'false')

No description

Parameters

string $driver
Closure $callback
bool $poolable

Return Value

FilesystemManager

at line 108
static void flushState()

No description

Return Value

void

at line 108
static FilesystemManager forgetDisk(array|string $disk)

No description

Parameters

array|string $disk

Return Value

FilesystemManager

at line 108
static string getDefaultDriver()

No description

Return Value

string

at line 108
static array getPoolableDrivers()

No description

Return Value

array

at line 108
static Closure|null getReleaseCallback(string $driver)

No description

Parameters

string $driver

Return Value

Closure|null

at line 108
static void purge(string|null $name = 'null')

No description

Parameters

string|null $name

Return Value

void

at line 108
static FilesystemManager removePoolableDriver(string $driver)

No description

Parameters

string $driver

Return Value

FilesystemManager

at line 108
static FilesystemManager set(string $name, mixed $disk)

No description

Parameters

string $name
mixed $disk

Return Value

FilesystemManager

at line 108
static FilesystemManager setApplication(Container $app)

No description

Parameters

Container $app

Return Value

FilesystemManager

at line 108
static FilesystemManager setPoolableDrivers(array $poolableDrivers)

No description

Parameters

array $poolableDrivers

Return Value

FilesystemManager

at line 108
static FilesystemManager setReleaseCallback(string $driver, Closure $callback)

No description

Parameters

string $driver
Closure $callback

Return Value

FilesystemManager

at line 108
static mixed unless(mixed $value = 'null', null|callable $callback = 'null', null|callable $default = 'null')

No description

Parameters

mixed $value
null|callable $callback
null|callable $default

Return Value

mixed

at line 108
static mixed when(mixed $value = 'null', null|callable $callback = 'null', null|callable $default = 'null')

No description

Parameters

mixed $value
null|callable $callback
null|callable $default

Return Value

mixed

at line 108
static string[] allDirectories(string|null $directory = 'null')

No description

Parameters

string|null $directory

Return Value

string[]

at line 108
static string[] allFiles(string|null $directory = 'null')

No description

Parameters

string|null $directory

Return Value

string[]

at line 108
static bool append(string $path, string $data, string $separator = '"\\n"')

No description

Parameters

string $path
string $data
string $separator

Return Value

bool

at line 108
static bool copy(string $from, string $to)

No description

Parameters

string $from
string $to

Return Value

bool

at line 108
static bool delete(array|string $paths)

No description

Parameters

array|string $paths

Return Value

bool

at line 108
static bool deleteDirectory(string $directory)

No description

Parameters

string $directory

Return Value

bool

at line 108
static string[] directories(string|null $directory = 'null', bool $recursive = 'false')

No description

Parameters

string|null $directory
bool $recursive

Return Value

string[]

at line 108
static bool exists(string $path)

No description

Parameters

string $path

Return Value

bool

at line 108
static string[] files(string|null $directory = 'null', bool $recursive = 'false')

No description

Parameters

string|null $directory
bool $recursive

Return Value

string[]

at line 108
static string|null get(string $path)

No description

Parameters

string $path

Return Value

string|null

at line 108
static string getVisibility(string $path)

No description

Parameters

string $path

Return Value

string

at line 108
static int lastModified(string $path)

No description

Parameters

string $path

Return Value

int

at line 108
static bool makeDirectory(string $path)

No description

Parameters

string $path

Return Value

bool

at line 108
static bool move(string $from, string $to)

No description

Parameters

string $from
string $to

Return Value

bool

at line 108
static string path(string $path)

No description

Parameters

string $path

Return Value

string

at line 108
static bool prepend(string $path, string $data, string $separator = '"\\n"')

No description

Parameters

string $path
string $data
string $separator

Return Value

bool

at line 108
static string|bool put(string $path, UploadedFile $contents, mixed $options = '[]')

No description

Parameters

string $path
UploadedFile $contents
mixed $options

Return Value

string|bool

at line 108
static string|false putFile(UploadedFile|string $path, UploadedFile|array|string|null $file = 'null', mixed $options = '[]')

No description

Parameters

UploadedFile|string $path
UploadedFile|array|string|null $file
mixed $options

Return Value

string|false

at line 108
static string|false putFileAs(UploadedFile|string $path, UploadedFile|array|string|null $file, array|string|null $name = 'null', mixed $options = '[]')

No description

Parameters

UploadedFile|string $path
UploadedFile|array|string|null $file
array|string|null $name
mixed $options

Return Value

string|false

at line 108
static null|resource readStream(string $path)

No description

Parameters

string $path

Return Value

null|resource

at line 108
static null|resource readStreamRange(string $path, int|null $start, int|null $end)

No description

Parameters

string $path
int|null $start
int|null $end

Return Value

null|resource

at line 108
static bool setVisibility(string $path, string $visibility)

No description

Parameters

string $path
string $visibility

Return Value

bool

at line 108
static int size(string $path)

No description

Parameters

string $path

Return Value

int

at line 108
static bool writeStream(string $path, resource $resource, array $options = '[]')

No description

Parameters

string $path
resource $resource
array $options

Return Value

bool

at line 108
static FilesystemAdapter assertCount(string $path, int $count, bool $recursive = 'false')

No description

Parameters

string $path
int $count
bool $recursive

Return Value

FilesystemAdapter

at line 108
static FilesystemAdapter assertDirectoryEmpty(string $path)

No description

Parameters

string $path

Return Value

FilesystemAdapter

at line 108
static FilesystemAdapter assertEmpty()

No description

Return Value

FilesystemAdapter

at line 108
static FilesystemAdapter assertExists(array|string $path, string|null $content = 'null')

No description

Parameters

array|string $path
string|null $content

Return Value

FilesystemAdapter

at line 108
static FilesystemAdapter assertMissing(array|string $path)

No description

Parameters

array|string $path

Return Value

FilesystemAdapter

at line 108
static void buildTemporaryUploadUrlsUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

void

at line 108
static void buildTemporaryUrlsUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

void

at line 108
static string|false checksum(string $path, array $options = '[]')

No description

Parameters

string $path
array $options

Return Value

string|false

at line 108
static bool copyToDisk(UnitEnum|string $disk, string $from, string|null $to = 'null')

No description

Parameters

UnitEnum|string $disk
string $from
string|null $to

Return Value

bool

at line 108
static bool directoryExists(string $path)

No description

Parameters

string $path

Return Value

bool

at line 108
static bool directoryMissing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 108
static StreamedResponse download(string $path, string|null $name = 'null', array $headers = '[]')

No description

Parameters

string $path
string|null $name
array $headers

Return Value

StreamedResponse

at line 108
static bool fileExists(string $path)

No description

Parameters

string $path

Return Value

bool

at line 108
static bool fileMissing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 108
static array getConfig()

No description

Return Value

array

at line 108
static Image image(string $path)

No description

Parameters

string $path

Return Value

Image

at line 108
static array|string|int|float|bool|null json(string $path, int $flags = '0')

No description

Parameters

string $path
int $flags

Return Value

array|string|int|float|bool|null

at line 108
static string|false mimeType(string $path)

No description

Parameters

string $path

Return Value

string|false

at line 108
static bool missing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 108
static bool moveToDisk(UnitEnum|string $disk, string $from, string|null $to = 'null')

No description

Parameters

UnitEnum|string $disk
string $from
string|null $to

Return Value

bool

at line 108
static bool providesTemporaryUploadUrls()

No description

Return Value

bool

at line 108
static bool providesTemporaryUrls()

No description

Return Value

bool

at line 108
static StreamedResponse response(string $path, string|null $name = 'null', array $headers = '[]', string $disposition = '\'inline\'')

No description

Parameters

string $path
string|null $name
array $headers
string $disposition

Return Value

StreamedResponse

at line 108
static Response serve(Request $request, string $path, string|null $name = 'null', array $headers = '[]')

No description

Parameters

Request $request
string $path
string|null $name
array $headers

Return Value

Response

at line 108
static void serveUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

void

at line 108
static array|string temporaryUploadUrl(string $path, DateTimeInterface $expiration, array $options = '[]')

No description

Parameters

string $path
DateTimeInterface $expiration
array $options

Return Value

array|string

at line 108
static string temporaryUrl(string $path, DateTimeInterface $expiration, array $options = '[]')

No description

Parameters

string $path
DateTimeInterface $expiration
array $options

Return Value

string

at line 108
static string url(string $path)

No description

Parameters

string $path

Return Value

string

at line 108
static void createDirectory(string $location, array $config = '[]')

No description

Parameters

string $location
array $config

Return Value

void

at line 108
static int fileSize(string $path)

No description

Parameters

string $path

Return Value

int

at line 108
static bool has(string $location)

No description

Parameters

string $location

Return Value

bool

at line 108
static string read(string $location)

No description

Parameters

string $location

Return Value

string

at line 108
static string visibility(string $path)

No description

Parameters

string $path

Return Value

string

at line 108
static void write(string $location, string $contents, array $config = '[]')

No description

Parameters

string $location
string $contents
array $config

Return Value

void

at line 108
static PoolDefinition getDefinition()

No description

Return Value

PoolDefinition

at line 108
static FilesystemOperator getOperator()

No description

Return Value

FilesystemOperator

at line 108
static string getPoolName()

No description

Return Value

string

at line 108
static bool invalidatePool()

No description

Return Value

bool

at line 108
static mixed withAdapter(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed

at line 108
static mixed withClient(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed

at line 108
static mixed withDriver(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed