class Storage extends Facade

Constants

protected STATE_CONTEXT_KEY

The context key for the coroutine-local facade roots.

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 array<string, true> $scopedAccessors

Accessors whose resolved objects belong to a coroutine scope.

from  Facade
static protected array<string, int> $coroutineAccessors

Accessors with coroutine-local roots, and their current generation.

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

createFtpDriver(array $config)

No description

createGcsDriver(array $config)

No description

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

No description

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

No description

static AwsS3V3Adapter
createS3Driver(array $config)

No description

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

No description

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(UnitEnum $disk)

No description

static string
getDefaultDriver()

No description

static array
getPoolableDrivers()

No description

static Closure|null
getReleaseCallback(string $driver)

No description

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

No description

removePoolableDriver(string $driver)

No description

set(UnitEnum|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
directoryExists(string $path)

No description

static bool
exists(string $path)

No description

static bool
fileExists(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
directoryMissing(string $path)

No description

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

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 mixed
withAdapter(Closure $callback)

No description

static mixed
withDriver(Closure $callback)

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
withClient(Closure $callback)

No description

Details

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

Run a Closure when the facade has been resolved.

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 106
static MockInterface|null spy()

Convert the facade into a Mockery spy.

Swaps the resolved facade instance for the worker lifetime.

Return Value

MockInterface|null

in Facade at line 125
static MockInterface partialMock()

Initiate a partial mock on the facade.

Swaps the resolved facade instance for the worker lifetime.

Return Value

MockInterface

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

Initiate a mock expectation on the facade.

Swaps the resolved facade instance for the worker lifetime.

Return Value

CompositeExpectation|Expectation|HigherOrderMessage

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

Initiate a mock expectation on the facade.

Swaps the resolved facade instance for the worker lifetime.

Return Value

CompositeExpectation|Expectation|ExpectsHigherOrderMessage

in Facade at line 176
static protected MockInterface createFreshMockInstance()

Create a fresh mock instance for the given class.

Swaps the resolved facade instance for the worker lifetime.

Return Value

MockInterface

in Facade at line 189
static protected MockInterface createMock()

Create a fresh mock instance for the given class.

Return Value

MockInterface

in Facade at line 199
static protected bool isMock()

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

Return Value

bool

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

Get the mockable class for the bound instance.

Return Value

string|null

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

Hotswap the underlying instance behind the facade.

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 239
static bool isFake()

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

Return Value

bool

in Facade at line 250
static mixed getFacadeRoot()

Get the root object behind the facade.

Return Value

mixed

at line 231
static protected string getFacadeAccessor()

Get the registered name of the component.

Return Value

string

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

Resolve the facade root instance from the container.

Parameters

string $name

Return Value

mixed

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

Clear a resolved facade instance.

Later facade calls everywhere resolve again; only references already held keep the previous instance.

Parameters

string|null $name

Return Value

void

in Facade at line 330
static void clearResolvedInstances()

Clear all of the resolved instances.

Later facade calls everywhere resolve again; only references already held keep the previous instances.

Return Value

void

in Facade at line 344
static Collection defaultAliases()

Get the application default aliases.

Return Value

Collection

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

Get the application instance behind the facade.

Return Value

Container|null

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

Set the application instance.

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 427
static mixed __callStatic(string $method, array $args)

Handle dynamic, static calls to the object.

Parameters

string $method
array $args

Return Value

mixed

Exceptions

RuntimeException
Throwable

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

Replace the given disk with a local testing disk.

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 159
static LocalFilesystemAdapter persistentFake(UnitEnum|string|null $disk = null, array $config = [])

Replace the given disk with a persistent local testing disk.

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 183
static protected string getRootPath(string $disk)

Get the root path of the given disk.

Parameters

string $disk

Return Value

string

at line 191
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 213
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 109
static FilesystemManager addPoolableDriver(string $driver)

No description

Parameters

string $driver

Return Value

FilesystemManager

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

No description

Parameters

array|string $config
string|null $name

Return Value

Filesystem

at line 109
static FilesystemAdapter createFtpDriver(array $config)

No description

Parameters

array $config

Return Value

FilesystemAdapter

at line 109
static GoogleCloudStorageAdapter createGcsDriver(array $config)

No description

Parameters

array $config

Return Value

GoogleCloudStorageAdapter

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

No description

Parameters

array $config
string $name

Return Value

LocalFilesystemAdapter

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

No description

Parameters

array $config
string $name

Return Value

ReadThroughFilesystem

at line 109
static AwsS3V3Adapter createS3Driver(array $config)

No description

Parameters

array $config

Return Value

AwsS3V3Adapter

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

No description

Parameters

array $config
string|null $name

Return Value

Filesystem

at line 109
static FilesystemAdapter createSftpDriver(array $config)

No description

Parameters

array $config

Return Value

FilesystemAdapter

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

No description

Parameters

UnitEnum|string|null $name

Return Value

Filesystem

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

No description

Parameters

UnitEnum|string|null $name

Return Value

Filesystem

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

No description

Parameters

string $driver
Closure $callback
bool $poolable

Return Value

FilesystemManager

at line 109
static void flushState()

No description

Return Value

void

at line 109
static FilesystemManager forgetDisk(UnitEnum $disk)

No description

Parameters

UnitEnum $disk

Return Value

FilesystemManager

at line 109
static string getDefaultDriver()

No description

Return Value

string

at line 109
static array getPoolableDrivers()

No description

Return Value

array

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

No description

Parameters

string $driver

Return Value

Closure|null

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

No description

Parameters

UnitEnum|string|null $name

Return Value

void

at line 109
static FilesystemManager removePoolableDriver(string $driver)

No description

Parameters

string $driver

Return Value

FilesystemManager

at line 109
static FilesystemManager set(UnitEnum|string $name, mixed $disk)

No description

Parameters

UnitEnum|string $name
mixed $disk

Return Value

FilesystemManager

at line 109
static FilesystemManager setApplication(Container $app)

No description

Parameters

Container $app

Return Value

FilesystemManager

at line 109
static FilesystemManager setPoolableDrivers(array $poolableDrivers)

No description

Parameters

array $poolableDrivers

Return Value

FilesystemManager

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

No description

Parameters

string $driver
Closure $callback

Return Value

FilesystemManager

at line 109
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 109
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 109
static string[] allDirectories(string|null $directory = 'null')

No description

Parameters

string|null $directory

Return Value

string[]

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

No description

Parameters

string|null $directory

Return Value

string[]

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

No description

Parameters

string $path
string $data
string $separator

Return Value

bool

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

No description

Parameters

string $from
string $to

Return Value

bool

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

No description

Parameters

array|string $paths

Return Value

bool

at line 109
static bool deleteDirectory(string $directory)

No description

Parameters

string $directory

Return Value

bool

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

No description

Parameters

string|null $directory
bool $recursive

Return Value

string[]

at line 109
static bool directoryExists(string $path)

No description

Parameters

string $path

Return Value

bool

at line 109
static bool exists(string $path)

No description

Parameters

string $path

Return Value

bool

at line 109
static bool fileExists(string $path)

No description

Parameters

string $path

Return Value

bool

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

No description

Parameters

string|null $directory
bool $recursive

Return Value

string[]

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

No description

Parameters

string $path

Return Value

string|null

at line 109
static string getVisibility(string $path)

No description

Parameters

string $path

Return Value

string

at line 109
static int lastModified(string $path)

No description

Parameters

string $path

Return Value

int

at line 109
static bool makeDirectory(string $path)

No description

Parameters

string $path

Return Value

bool

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

No description

Parameters

string $from
string $to

Return Value

bool

at line 109
static string path(string $path)

No description

Parameters

string $path

Return Value

string

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

No description

Parameters

string $path
string $data
string $separator

Return Value

bool

at line 109
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 109
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 109
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 109
static null|resource readStream(string $path)

No description

Parameters

string $path

Return Value

null|resource

at line 109
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 109
static bool setVisibility(string $path, string $visibility)

No description

Parameters

string $path
string $visibility

Return Value

bool

at line 109
static int size(string $path)

No description

Parameters

string $path

Return Value

int

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

No description

Parameters

string $path
resource $resource
array $options

Return Value

bool

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

No description

Parameters

string $path
int $count
bool $recursive

Return Value

FilesystemAdapter

at line 109
static FilesystemAdapter assertDirectoryEmpty(string $path)

No description

Parameters

string $path

Return Value

FilesystemAdapter

at line 109
static FilesystemAdapter assertEmpty()

No description

Return Value

FilesystemAdapter

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

No description

Parameters

array|string $path
string|null $content

Return Value

FilesystemAdapter

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

No description

Parameters

array|string $path

Return Value

FilesystemAdapter

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

No description

Parameters

Closure|null $callback

Return Value

void

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

No description

Parameters

Closure|null $callback

Return Value

void

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

No description

Parameters

string $path
array $options

Return Value

string|false

at line 109
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 109
static bool directoryMissing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 109
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 109
static bool fileMissing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 109
static array getConfig()

No description

Return Value

array

at line 109
static Image image(string $path)

No description

Parameters

string $path

Return Value

Image

at line 109
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 109
static string|false mimeType(string $path)

No description

Parameters

string $path

Return Value

string|false

at line 109
static bool missing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 109
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 109
static bool providesTemporaryUploadUrls()

No description

Return Value

bool

at line 109
static bool providesTemporaryUrls()

No description

Return Value

bool

at line 109
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 109
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 109
static void serveUsing(Closure|null $callback)

No description

Parameters

Closure|null $callback

Return Value

void

at line 109
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 109
static string temporaryUrl(string $path, DateTimeInterface $expiration, array $options = '[]')

No description

Parameters

string $path
DateTimeInterface $expiration
array $options

Return Value

string

at line 109
static string url(string $path)

No description

Parameters

string $path

Return Value

string

at line 109
static mixed withAdapter(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed

at line 109
static mixed withDriver(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed

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

No description

Parameters

string $location
array $config

Return Value

void

at line 109
static int fileSize(string $path)

No description

Parameters

string $path

Return Value

int

at line 109
static bool has(string $location)

No description

Parameters

string $location

Return Value

bool

at line 109
static string read(string $location)

No description

Parameters

string $location

Return Value

string

at line 109
static string visibility(string $path)

No description

Parameters

string $path

Return Value

string

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

No description

Parameters

string $location
string $contents
array $config

Return Value

void

at line 109
static PoolDefinition getDefinition()

No description

Return Value

PoolDefinition

at line 109
static FilesystemOperator getOperator()

No description

Return Value

FilesystemOperator

at line 109
static string getPoolName()

No description

Return Value

string

at line 109
static bool invalidatePool()

No description

Return Value

bool

at line 109
static mixed withClient(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed