Storage
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
Initiate a mock expectation on the facade.
Initiate a mock expectation on the facade.
Create a fresh mock instance for the given class.
Get the registered name of the component.
Resolve the facade root instance from the container.
Clear a resolved facade instance.
Get the application instance behind the facade.
Handle dynamic, static calls to the object.
Replace the given disk with a local testing disk.
Replace the given disk with a persistent local testing disk.
Get the root path of the given disk.
Assemble the configuration of the given disk.
Get methods that should be excluded from the generated facade docblock.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
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.
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.
in
Facade at line 125
static MockInterface
partialMock()
Initiate a partial mock on the facade.
Swaps the resolved facade instance for the worker lifetime.
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.
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.
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.
in
Facade at line 189
static protected MockInterface
createMock()
Create a fresh mock instance for the given class.
in
Facade at line 199
static protected bool
isMock()
Determines whether a mock is set as the instance of the facade.
in
Facade at line 210
static protected string|null
getMockableClass()
Get the mockable class for the bound instance.
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.
in
Facade at line 239
static bool
isFake()
Determines whether a "fake" has been set as the facade instance.
in
Facade at line 250
static mixed
getFacadeRoot()
Get the root object behind the facade.
at line 231
static protected string
getFacadeAccessor()
Get the registered name of the component.
in
Facade at line 266
static protected mixed
resolveFacadeInstance(string $name)
Resolve the facade root instance from the container.
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.
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.
in
Facade at line 344
static Collection
defaultAliases()
Get the application default aliases.
in
Facade at line 404
static Container|null
getFacadeApplication()
Get the application instance behind the facade.
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.
in
Facade at line 427
static mixed
__callStatic(string $method, array $args)
Handle dynamic, static calls to the object.
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.
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.
at line 183
static protected string
getRootPath(string $disk)
Get the root path of the given disk.
at line 191
static protected array
buildDiskConfiguration(string $disk, array $config, string $root)
Assemble the configuration of the given disk.
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.
at line 109
static FilesystemManager
addPoolableDriver(string $driver)
No description
at line 109
static Filesystem
build(array|string $config, string|null $name = 'null')
No description
at line 109
static FilesystemAdapter
createFtpDriver(array $config)
No description
at line 109
static GoogleCloudStorageAdapter
createGcsDriver(array $config)
No description
at line 109
static LocalFilesystemAdapter
createLocalDriver(array $config, string $name = '\'local\'')
No description
at line 109
static ReadThroughFilesystem
createReadThroughDriver(array $config, string $name = '\'read-through\'')
No description
at line 109
static AwsS3V3Adapter
createS3Driver(array $config)
No description
at line 109
static Filesystem
createScopedDriver(array $config, string|null $name = 'null')
No description
at line 109
static FilesystemAdapter
createSftpDriver(array $config)
No description
at line 109
static Filesystem
disk(UnitEnum|string|null $name = 'null')
No description
at line 109
static Filesystem
drive(UnitEnum|string|null $name = 'null')
No description
at line 109
static FilesystemManager
extend(string $driver, Closure $callback, bool $poolable = 'false')
No description
at line 109
static void
flushState()
No description
at line 109
static FilesystemManager
forgetDisk(UnitEnum $disk)
No description
at line 109
static string
getDefaultDriver()
No description
at line 109
static array
getPoolableDrivers()
No description
at line 109
static Closure|null
getReleaseCallback(string $driver)
No description
at line 109
static void
purge(UnitEnum|string|null $name = 'null')
No description
at line 109
static FilesystemManager
removePoolableDriver(string $driver)
No description
at line 109
static FilesystemManager
set(UnitEnum|string $name, mixed $disk)
No description
at line 109
static FilesystemManager
setApplication(Container $app)
No description
at line 109
static FilesystemManager
setPoolableDrivers(array $poolableDrivers)
No description
at line 109
static FilesystemManager
setReleaseCallback(string $driver, Closure $callback)
No description
at line 109
static mixed
unless(mixed $value = 'null', null|callable $callback = 'null', null|callable $default = 'null')
No description
at line 109
static mixed
when(mixed $value = 'null', null|callable $callback = 'null', null|callable $default = 'null')
No description
at line 109
static string[]
allDirectories(string|null $directory = 'null')
No description
at line 109
static string[]
allFiles(string|null $directory = 'null')
No description
at line 109
static bool
append(string $path, string $data, string $separator = '"\\n"')
No description
at line 109
static bool
copy(string $from, string $to)
No description
at line 109
static bool
delete(array|string $paths)
No description
at line 109
static bool
deleteDirectory(string $directory)
No description
at line 109
static string[]
directories(string|null $directory = 'null', bool $recursive = 'false')
No description
at line 109
static bool
directoryExists(string $path)
No description
at line 109
static bool
exists(string $path)
No description
at line 109
static bool
fileExists(string $path)
No description
at line 109
static string[]
files(string|null $directory = 'null', bool $recursive = 'false')
No description
at line 109
static string|null
get(string $path)
No description
at line 109
static string
getVisibility(string $path)
No description
at line 109
static int
lastModified(string $path)
No description
at line 109
static bool
makeDirectory(string $path)
No description
at line 109
static bool
move(string $from, string $to)
No description
at line 109
static string
path(string $path)
No description
at line 109
static bool
prepend(string $path, string $data, string $separator = '"\\n"')
No description
at line 109
static string|bool
put(string $path, UploadedFile $contents, mixed $options = '[]')
No description
at line 109
static string|false
putFile(UploadedFile|string $path, UploadedFile|array|string|null $file = 'null', mixed $options = '[]')
No description
at line 109
static string|false
putFileAs(UploadedFile|string $path, UploadedFile|array|string|null $file, array|string|null $name = 'null', mixed $options = '[]')
No description
at line 109
static null|resource
readStream(string $path)
No description
at line 109
static null|resource
readStreamRange(string $path, int|null $start, int|null $end)
No description
at line 109
static bool
setVisibility(string $path, string $visibility)
No description
at line 109
static int
size(string $path)
No description
at line 109
static bool
writeStream(string $path, resource $resource, array $options = '[]')
No description
at line 109
static FilesystemAdapter
assertCount(string $path, int $count, bool $recursive = 'false')
No description
at line 109
static FilesystemAdapter
assertDirectoryEmpty(string $path)
No description
at line 109
static FilesystemAdapter
assertEmpty()
No description
at line 109
static FilesystemAdapter
assertExists(array|string $path, string|null $content = 'null')
No description
at line 109
static FilesystemAdapter
assertMissing(array|string $path)
No description
at line 109
static void
buildTemporaryUploadUrlsUsing(Closure|null $callback)
No description
at line 109
static void
buildTemporaryUrlsUsing(Closure|null $callback)
No description
at line 109
static string|false
checksum(string $path, array $options = '[]')
No description
at line 109
static bool
copyToDisk(UnitEnum|string $disk, string $from, string|null $to = 'null')
No description
at line 109
static bool
directoryMissing(string $path)
No description
at line 109
static StreamedResponse
download(string $path, string|null $name = 'null', array $headers = '[]')
No description
at line 109
static bool
fileMissing(string $path)
No description
at line 109
static array
getConfig()
No description
at line 109
static Image
image(string $path)
No description
at line 109
static array|string|int|float|bool|null
json(string $path, int $flags = '0')
No description
at line 109
static string|false
mimeType(string $path)
No description
at line 109
static bool
missing(string $path)
No description
at line 109
static bool
moveToDisk(UnitEnum|string $disk, string $from, string|null $to = 'null')
No description
at line 109
static bool
providesTemporaryUploadUrls()
No description
at line 109
static bool
providesTemporaryUrls()
No description
at line 109
static StreamedResponse
response(string $path, string|null $name = 'null', array $headers = '[]', string $disposition = '\'inline\'')
No description
at line 109
static Response
serve(Request $request, string $path, string|null $name = 'null', array $headers = '[]')
No description
at line 109
static void
serveUsing(Closure|null $callback)
No description
at line 109
static array|string
temporaryUploadUrl(string $path, DateTimeInterface $expiration, array $options = '[]')
No description
at line 109
static string
temporaryUrl(string $path, DateTimeInterface $expiration, array $options = '[]')
No description
at line 109
static string
url(string $path)
No description
at line 109
static mixed
withAdapter(Closure $callback)
No description
at line 109
static mixed
withDriver(Closure $callback)
No description
at line 109
static void
createDirectory(string $location, array $config = '[]')
No description
at line 109
static int
fileSize(string $path)
No description
at line 109
static bool
has(string $location)
No description
at line 109
static string
read(string $location)
No description
at line 109
static string
visibility(string $path)
No description
at line 109
static void
write(string $location, string $contents, array $config = '[]')
No description
at line 109
static PoolDefinition
getDefinition()
No description
at line 109
static FilesystemOperator
getOperator()
No description
at line 109
static string
getPoolName()
No description
at line 109
static bool
invalidatePool()
No description
at line 109
static mixed
withClient(Closure $callback)
No description