File
extends Facade
in package
Facade base class Adds the ability to define a fallback instance.
Tags
Table of Contents
- $app : Application
- The application instance being facaded.
- $resolvedInstance : array<string|int, mixed>
- The resolved object instances.
- __callStatic() : mixed
- Handle dynamic, static calls to the object.
- allFiles() :
- append() :
- basename() :
- chmod() :
- chmodRecursive() :
- cleanDirectory() :
- clearResolvedInstance() : void
- Clear a resolved facade instance.
- clearResolvedInstances() : void
- Clear all of the resolved instances.
- copy() :
- copyDirectory() :
- delete() :
- deleteDirectory() :
- directories() :
- dirname() :
- ensureDirectoryExists() :
- exists() :
- existsInsensitive() :
- extension() :
- fileNameMatch() :
- files() :
- fromClass() :
- get() :
- getFacadeApplication() : Application
- Get the application instance behind the facade.
- getFacadeRoot() : mixed
- Get the root object behind the facade.
- getFilePermissions() :
- getFolderPermissions() :
- getRequire() :
- glob() :
- hash() :
- isDirectory() :
- isDirectoryEmpty() :
- isFile() :
- isLocalPath() :
- isPathSymbol() :
- isReadable() :
- isWritable() :
- lastModified() :
- link() :
- localToPublic() :
- makeDirectory() :
- mimeType() :
- move() :
- moveDirectory() :
- name() :
- normalizePath() :
- prepend() :
- put() :
- requireOnce() :
- setFacadeApplication() : void
- Set the application instance.
- sharedGet() :
- shouldReceive() : Expectation
- Initiate a mock expectation on the facade.
- size() :
- sizeToString() :
- spy() : void
- Convert the facade into a Mockery spy.
- swap() : void
- Hotswap the underlying instance behind the facade.
- symbolizePath() :
- type() :
- createFreshMockInstance() : Expectation
- Create a fresh mock instance for the given class.
- createMock() : MockInterface
- Create a fresh mock instance for the given class.
- getFacadeAccessor() : string
- Get the registered name of the component.
- getFacadeInstance() : mixed
- If the accessor is not found via getFacadeAccessor, use this instance as a fallback.
- getMockableClass() : string|null
- Get the mockable class for the bound instance.
- isMock() : bool
- Determines whether a mock is set as the instance of the facade.
- resolveFacadeInstance() : mixed
- Resolve the facade root instance from the container.
Properties
$app
The application instance being facaded.
protected
static Application
$app
$resolvedInstance
The resolved object instances.
protected
static array<string|int, mixed>
$resolvedInstance
Methods
__callStatic()
Handle dynamic, static calls to the object.
public
static __callStatic(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
Tags
Return values
mixed —allFiles()
public
static allFiles(string $directory, bool $hidden = false) :
Parameters
- $directory : string
- $hidden = false : bool
Return values
—append()
public
static append(string $path, string $data) :
Parameters
- $path : string
- $data : string
Return values
—basename()
public
static basename(string $path) :
Parameters
- $path : string
Return values
—chmod()
public
static chmod(string $path, int $mode = null) :
Parameters
- $path : string
- $mode = null : int
Return values
—chmodRecursive()
public
static chmodRecursive(string $path, mixed $fileMask, mixed $directoryMask) :
Parameters
- $path : string
- $fileMask : mixed
- $directoryMask : mixed
Return values
—cleanDirectory()
public
static cleanDirectory(string $directory) :
Parameters
- $directory : string
Return values
—clearResolvedInstance()
Clear a resolved facade instance.
public
static clearResolvedInstance(string $name) : void
Parameters
- $name : string
Return values
void —clearResolvedInstances()
Clear all of the resolved instances.
public
static clearResolvedInstances() : void
Return values
void —copy()
public
static copy(string $path, string $target) :
Parameters
- $path : string
- $target : string
Return values
—copyDirectory()
public
static copyDirectory(string $directory, string $destination, int $options = null) :
Parameters
- $directory : string
- $destination : string
- $options = null : int
Return values
—delete()
public
static delete(string|array<string|int, mixed> $paths) :
Parameters
- $paths : string|array<string|int, mixed>
Return values
—deleteDirectory()
public
static deleteDirectory(string $directory, bool $preserve = false) :
Parameters
- $directory : string
- $preserve = false : bool
Return values
—directories()
public
static directories(string $directory) :
Parameters
- $directory : string
Return values
—dirname()
public
static dirname(string $path) :
Parameters
- $path : string
Return values
—ensureDirectoryExists()
public
static ensureDirectoryExists(string $path, int $mode = 0755, bool $recursive = true) :
Parameters
- $path : string
- $mode = 0755 : int
- $recursive = true : bool
Return values
—exists()
public
static exists(string $path) :
Parameters
- $path : string
Return values
—existsInsensitive()
public
static existsInsensitive(string $path) :
Parameters
- $path : string
Return values
—extension()
public
static extension(string $path) :
Parameters
- $path : string
Return values
—fileNameMatch()
public
static fileNameMatch(string|array<string|int, mixed> $fileName, string $pattern) :
Parameters
- $fileName : string|array<string|int, mixed>
- $pattern : string
Return values
—files()
public
static files(string $directory, bool $hidden = false) :
Parameters
- $directory : string
- $hidden = false : bool
Return values
—fromClass()
public
static fromClass(mixed $classname) :
Parameters
- $classname : mixed
Return values
—get()
public
static get(string $path, bool $lock) :
Parameters
- $path : string
- $lock : bool
Return values
—getFacadeApplication()
Get the application instance behind the facade.
public
static getFacadeApplication() : Application
Return values
Application —getFacadeRoot()
Get the root object behind the facade.
public
static getFacadeRoot() : mixed
Return values
mixed —getFilePermissions()
public
static getFilePermissions() :
Return values
—getFolderPermissions()
public
static getFolderPermissions() :
Return values
—getRequire()
public
static getRequire(string $path) :
Parameters
- $path : string
Return values
—glob()
public
static glob(string $pattern, int $flags = 0) :
Parameters
- $pattern : string
- $flags = 0 : int
Return values
—hash()
public
static hash(string $path) :
Parameters
- $path : string
Return values
—isDirectory()
public
static isDirectory(string $directory) :
Parameters
- $directory : string
Return values
—isDirectoryEmpty()
public
static isDirectoryEmpty(string $directory) :
Parameters
- $directory : string
Return values
—isFile()
public
static isFile(string $file) :
Parameters
- $file : string
Return values
—isLocalPath()
public
static isLocalPath(string $path, bool $realpath = true) :
Parameters
- $path : string
- $realpath = true : bool
Return values
—isPathSymbol()
public
static isPathSymbol(string $path) :
Parameters
- $path : string
Return values
—isReadable()
public
static isReadable(string $path) :
Parameters
- $path : string
Return values
—isWritable()
public
static isWritable(string $path) :
Parameters
- $path : string
Return values
—lastModified()
public
static lastModified(string $path) :
Parameters
- $path : string
Return values
—link()
public
static link(string $target, string $link) :
Parameters
- $target : string
- $link : string
Return values
—localToPublic()
public
static localToPublic(string $path) :
Parameters
- $path : string
Return values
—makeDirectory()
public
static makeDirectory(string $path, int $mode = 0755, bool $recursive = false, bool $force = false) :
Parameters
- $path : string
- $mode = 0755 : int
- $recursive = false : bool
- $force = false : bool
Return values
—mimeType()
public
static mimeType(string $path) :
Parameters
- $path : string
Return values
—move()
public
static move(string $path, string $target) :
Parameters
- $path : string
- $target : string
Return values
—moveDirectory()
public
static moveDirectory(string $from, string $to, bool $overwrite = false) :
Parameters
- $from : string
- $to : string
- $overwrite = false : bool
Return values
—name()
public
static name(string $path) :
Parameters
- $path : string
Return values
—normalizePath()
public
static normalizePath(string $path) :
Parameters
- $path : string
Return values
—prepend()
public
static prepend(string $path, string $data) :
Parameters
- $path : string
- $data : string
Return values
—put()
public
static put(string $path, string $contents, bool $lock = false) :
Parameters
- $path : string
- $contents : string
- $lock = false : bool
Return values
—requireOnce()
public
static requireOnce(string $file) :
Parameters
- $file : string
Return values
—setFacadeApplication()
Set the application instance.
public
static setFacadeApplication(Application $app) : void
Parameters
- $app : Application
Return values
void —sharedGet()
public
static sharedGet(string $path) :
Parameters
- $path : string
Return values
—shouldReceive()
Initiate a mock expectation on the facade.
public
static shouldReceive() : Expectation
Return values
Expectation —size()
public
static size(string $path) :
Parameters
- $path : string
Return values
—sizeToString()
public
static sizeToString(int $bytes) :
Parameters
- $bytes : int
Return values
—spy()
Convert the facade into a Mockery spy.
public
static spy() : void
Return values
void —swap()
Hotswap the underlying instance behind the facade.
public
static swap(mixed $instance) : void
Parameters
- $instance : mixed
Return values
void —symbolizePath()
public
static symbolizePath(string $path, bool $default = false) :
Parameters
- $path : string
- $default = false : bool
Return values
—type()
public
static type(string $path) :
Parameters
- $path : string
Return values
—createFreshMockInstance()
Create a fresh mock instance for the given class.
protected
static createFreshMockInstance() : Expectation
Return values
Expectation —createMock()
Create a fresh mock instance for the given class.
protected
static createMock() : MockInterface
Return values
MockInterface —getFacadeAccessor()
Get the registered name of the component.
protected
static getFacadeAccessor() : string
Return values
string —getFacadeInstance()
If the accessor is not found via getFacadeAccessor, use this instance as a fallback.
protected
static getFacadeInstance() : mixed
Return values
mixed —getMockableClass()
Get the mockable class for the bound instance.
protected
static getMockableClass() : string|null
Return values
string|null —isMock()
Determines whether a mock is set as the instance of the facade.
protected
static isMock() : bool
Return values
bool —resolveFacadeInstance()
Resolve the facade root instance from the container.
protected
static resolveFacadeInstance(string|object $name) : mixed
Parameters
- $name : string|object