class Storage extends Facade

Properties

static protected $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 
spy()

Convert the facade into a Mockery spy.

from  Facade
static 
partialMock()

Initiate a partial mock on the facade.

from  Facade
static 
shouldReceive()

Initiate a mock expectation on the facade.

from  Facade
static 
expects()

Initiate a mock expectation on the facade.

from  Facade
static 
createFreshMockInstance()

Create a fresh mock instance for the given class.

from  Facade
static 
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 
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 
getFacadeApplication()

Get the application instance behind the facade.

from  Facade
static void
setFacadeApplication(mixed $app)

Set the application instance.

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

Handle dynamic, static calls to the object.

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

Replace the given disk with a local testing disk.

static Filesystem
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 Filesystem
drive(UnitEnum|string|null $name = 'null')

No description

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

No description

static Filesystem
build(array|string $config)

No description

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

No description

static Filesystem
createFtpDriver(array $config)

No description

static Filesystem
createSftpDriver(array $config)

No description

static Cloud
createS3Driver(array $config)

No description

static Cloud
createGcsDriver(array $config)

No description

static Filesystem
createScopedDriver(array $config)

No description

set(string $name, mixed $disk)

No description

static string
getDefaultDriver()

No description

forgetDisk(array|string $disk)

No description

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

No description

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

No description

setApplication(Container $app)

No description

setReleaseCallback(string $driver, Closure $callback)

No description

static Closure|null
getReleaseCallback(string $driver)

No description

addPoolable(string $driver)

No description

removePoolable(string $driver)

No description

static array
getPoolables()

No description

setPoolables(array $poolables)

No description

static string
path(string $path)

No description

static bool
exists(string $path)

No description

static string|null
get(string $path)

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 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 bool
writeStream(string $path, resource $resource, array $options = '[]')

No description

static string
getVisibility(string $path)

No description

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

No description

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

No description

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

No description

static bool
delete(array|string $paths)

No description

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

No description

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

No description

static int
size(string $path)

No description

static int
lastModified(string $path)

No description

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

No description

static array
allFiles(string|null $directory = 'null')

No description

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

No description

static array
allDirectories(string|null $directory = 'null')

No description

static bool
makeDirectory(string $path)

No description

static bool
deleteDirectory(string $directory)

No description

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

No description

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

No description

assertMissing(array|string $path)

No description

assertDirectoryEmpty(string $path)

No description

assertEmpty()

No description

static bool
missing(string $path)

No description

static bool
fileExists(string $path)

No description

static bool
fileMissing(string $path)

No description

static bool
directoryExists(string $path)

No description

static bool
directoryMissing(string $path)

No description

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

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 StreamedResponse
download(string $path, string|null $name = 'null', array $headers = '[]')

No description

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

No description

static string|false
mimeType(string $path)

No description

static string
url(string $path)

No description

static bool
providesTemporaryUrls()

No description

static bool
providesTemporaryUploadUrls()

No description

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

No description

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

No description

static array
getConfig()

No description

static mixed
withDriver(Closure $callback)

No description

static mixed
withAdapter(Closure $callback)

No description

static mixed
withClient(Closure $callback)

No description

static PoolDefinition
getDefinition()

No description

static string
getPoolName()

No description

static bool
invalidatePool()

No description

static void
serveUsing(Closure|null $callback)

No description

static void
buildTemporaryUrlsUsing(Closure|null $callback)

No description

static void
buildTemporaryUploadUrlsUsing(Closure|null $callback)

No description

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

No description

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

No description

static bool
has(string $location)

No description

static string
read(string $location)

No description

static int
fileSize(string $path)

No description

static string
visibility(string $path)

No description

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

No description

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

No description

Details

in Facade at line 55
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 71
static spy()

Convert the facade into a Mockery spy.

in Facade at line 89
static partialMock()

Initiate a partial mock on the facade.

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

in Facade at line 105
static shouldReceive()

Initiate a mock expectation on the facade.

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

in Facade at line 121
static expects()

Initiate a mock expectation on the facade.

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

in Facade at line 135
static protected createFreshMockInstance()

Create a fresh mock instance for the given class.

in Facade at line 147
static protected createMock()

Create a fresh mock instance for the given class.

in Facade at line 157
static protected bool isMock()

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

Return Value

bool

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

Get the mockable class for the bound instance.

Return Value

string|null

in Facade at line 184
static 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

in Facade at line 196
static bool isFake()

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

Return Value

bool

in Facade at line 207
static mixed getFacadeRoot()

Get the root object behind the facade.

Return Value

mixed

at line 191
static protected string getFacadeAccessor()

Get the registered name of the component.

Return Value

string

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

Resolve the facade root instance from the container.

Parameters

string $name

Return Value

mixed

in Facade at line 246
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 257
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 265
static Collection defaultAliases()

Get the application default aliases.

Return Value

Collection

in Facade at line 324
static getFacadeApplication()

Get the application instance behind the facade.

in Facade at line 337
static void setFacadeApplication(mixed $app)

Set the application instance.

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

Parameters

mixed $app

Return Value

void

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

Handle dynamic, static calls to the object.

Parameters

string $method
array $args

Exceptions

RuntimeException

at line 111
static Filesystem 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

Filesystem

at line 152
static Filesystem 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

Filesystem

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

Get the root path of the given disk.

Parameters

string $disk

Return Value

string

at line 180
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 101
static Filesystem drive(UnitEnum|string|null $name = 'null')

No description

Parameters

UnitEnum|string|null $name

Return Value

Filesystem

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

No description

Parameters

UnitEnum|string|null $name

Return Value

Filesystem

at line 101
static Filesystem build(array|string $config)

No description

Parameters

array|string $config

Return Value

Filesystem

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

No description

Parameters

array $config
string $name

Return Value

Filesystem

at line 101
static Filesystem createFtpDriver(array $config)

No description

Parameters

array $config

Return Value

Filesystem

at line 101
static Filesystem createSftpDriver(array $config)

No description

Parameters

array $config

Return Value

Filesystem

at line 101
static Cloud createS3Driver(array $config)

No description

Parameters

array $config

Return Value

Cloud

at line 101
static Cloud createGcsDriver(array $config)

No description

Parameters

array $config

Return Value

Cloud

at line 101
static Filesystem createScopedDriver(array $config)

No description

Parameters

array $config

Return Value

Filesystem

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

No description

Parameters

string $name
mixed $disk

Return Value

FilesystemManager

at line 101
static string getDefaultDriver()

No description

Return Value

string

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

No description

Parameters

array|string $disk

Return Value

FilesystemManager

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

No description

Parameters

string|null $name

Return Value

void

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

No description

Parameters

string $driver
Closure $callback
bool $poolable

Return Value

FilesystemManager

at line 101
static FilesystemManager setApplication(Container $app)

No description

Parameters

Container $app

Return Value

FilesystemManager

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

No description

Parameters

string $driver
Closure $callback

Return Value

FilesystemManager

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

No description

Parameters

string $driver

Return Value

Closure|null

at line 101
static FilesystemManager addPoolable(string $driver)

No description

Parameters

string $driver

Return Value

FilesystemManager

at line 101
static FilesystemManager removePoolable(string $driver)

No description

Parameters

string $driver

Return Value

FilesystemManager

at line 101
static array getPoolables()

No description

Return Value

array

at line 101
static FilesystemManager setPoolables(array $poolables)

No description

Parameters

array $poolables

Return Value

FilesystemManager

at line 101
static string path(string $path)

No description

Parameters

string $path

Return Value

string

at line 101
static bool exists(string $path)

No description

Parameters

string $path

Return Value

bool

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

No description

Parameters

string $path

Return Value

string|null

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

No description

Parameters

string $path

Return Value

null|resource

at line 101
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 101
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 101
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 101
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 101
static bool writeStream(string $path, resource $resource, array $options = '[]')

No description

Parameters

string $path
resource $resource
array $options

Return Value

bool

at line 101
static string getVisibility(string $path)

No description

Parameters

string $path

Return Value

string

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

No description

Parameters

string $path
string $visibility

Return Value

bool

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

No description

Parameters

string $path
string $data
string $separator

Return Value

bool

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

No description

Parameters

string $path
string $data
string $separator

Return Value

bool

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

No description

Parameters

array|string $paths

Return Value

bool

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

No description

Parameters

string $from
string $to

Return Value

bool

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

No description

Parameters

string $from
string $to

Return Value

bool

at line 101
static int size(string $path)

No description

Parameters

string $path

Return Value

int

at line 101
static int lastModified(string $path)

No description

Parameters

string $path

Return Value

int

at line 101
static array files(string|null $directory = 'null', bool $recursive = 'false')

No description

Parameters

string|null $directory
bool $recursive

Return Value

array

at line 101
static array allFiles(string|null $directory = 'null')

No description

Parameters

string|null $directory

Return Value

array

at line 101
static array directories(string|null $directory = 'null', bool $recursive = 'false')

No description

Parameters

string|null $directory
bool $recursive

Return Value

array

at line 101
static array allDirectories(string|null $directory = 'null')

No description

Parameters

string|null $directory

Return Value

array

at line 101
static bool makeDirectory(string $path)

No description

Parameters

string $path

Return Value

bool

at line 101
static bool deleteDirectory(string $directory)

No description

Parameters

string $directory

Return Value

bool

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

No description

Parameters

array|string $path
string|null $content

Return Value

FilesystemAdapter

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

No description

Parameters

string $path
int $count
bool $recursive

Return Value

FilesystemAdapter

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

No description

Parameters

array|string $path

Return Value

FilesystemAdapter

at line 101
static FilesystemAdapter assertDirectoryEmpty(string $path)

No description

Parameters

string $path

Return Value

FilesystemAdapter

at line 101
static FilesystemAdapter assertEmpty()

No description

Return Value

FilesystemAdapter

at line 101
static bool missing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 101
static bool fileExists(string $path)

No description

Parameters

string $path

Return Value

bool

at line 101
static bool fileMissing(string $path)

No description

Parameters

string $path

Return Value

bool

at line 101
static bool directoryExists(string $path)

No description

Parameters

string $path

Return Value

bool

at line 101
static bool directoryMissing(string $path)

No description

Parameters

string $path

Return Value

bool

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

No description

Parameters

string $path
int $flags

Return Value

array|bool|float|int|string|null

at line 101
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 101
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 101
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 101
static string|false checksum(string $path, array $options = '[]')

No description

Parameters

string $path
array $options

Return Value

string|false

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

No description

Parameters

string $path

Return Value

string|false

at line 101
static string url(string $path)

No description

Parameters

string $path

Return Value

string

at line 101
static bool providesTemporaryUrls()

No description

Return Value

bool

at line 101
static bool providesTemporaryUploadUrls()

No description

Return Value

bool

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

No description

Parameters

string $path
DateTimeInterface $expiration
array $options

Return Value

string

at line 101
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 101
static array getConfig()

No description

Return Value

array

at line 101
static mixed withDriver(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed

at line 101
static mixed withAdapter(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed

at line 101
static mixed withClient(Closure $callback)

No description

Parameters

Closure $callback

Return Value

mixed

at line 101
static PoolDefinition getDefinition()

No description

Return Value

PoolDefinition

at line 101
static string getPoolName()

No description

Return Value

string

at line 101
static bool invalidatePool()

No description

Return Value

bool

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

No description

Parameters

Closure|null $callback

Return Value

void

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

No description

Parameters

Closure|null $callback

Return Value

void

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

No description

Parameters

Closure|null $callback

Return Value

void

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

No description

Parameters

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

Return Value

Filesystem|mixed

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

No description

Parameters

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

Return Value

Filesystem|mixed

at line 101
static bool has(string $location)

No description

Parameters

string $location

Return Value

bool

at line 101
static string read(string $location)

No description

Parameters

string $location

Return Value

string

at line 101
static int fileSize(string $path)

No description

Parameters

string $path

Return Value

int

at line 101
static string visibility(string $path)

No description

Parameters

string $path

Return Value

string

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

No description

Parameters

string $location
string $contents
array $config

Return Value

void

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

No description

Parameters

string $location
array $config

Return Value

void