Config
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.
- addNamespace() :
- afterLoading() :
- all() :
- clearResolvedInstance() : void
- Clear a resolved facade instance.
- clearResolvedInstances() : void
- Clear all of the resolved instances.
- get() :
- getAfterLoadCallbacks() :
- getEnvironment() :
- getFacadeApplication() : Application
- Get the application instance behind the facade.
- getFacadeRoot() : mixed
- Get the root object behind the facade.
- getItems() :
- getLoader() :
- getNamespaces() :
- has() :
- hasGroup() :
- offsetExists() :
- offsetGet() :
- offsetSet() :
- offsetUnset() :
- package() :
- parseConfigKey() :
- prepend() :
- push() :
- set() :
- setFacadeApplication() : void
- Set the application instance.
- setLoader() :
- shouldReceive() : Expectation
- Initiate a mock expectation on the facade.
- spy() : void
- Convert the facade into a Mockery spy.
- swap() : void
- Hotswap the underlying instance behind the facade.
- 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 —addNamespace()
public
static addNamespace(string $namespace, string $hint) :
Parameters
- $namespace : string
- $hint : string
Return values
—afterLoading()
public
static afterLoading(string $namespace, Closure $callback) :
Parameters
- $namespace : string
- $callback : Closure
Return values
—all()
public
static all() :
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 —get()
public
static get(array<string|int, mixed>|string $key, mixed $default) :
Parameters
- $key : array<string|int, mixed>|string
- $default : mixed
Return values
—getAfterLoadCallbacks()
public
static getAfterLoadCallbacks() :
Return values
—getEnvironment()
public
static getEnvironment() :
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 —getItems()
public
static getItems() :
Return values
—getLoader()
public
static getLoader() :
Return values
—getNamespaces()
public
static getNamespaces() :
Return values
—has()
public
static has(string $key) :
Parameters
- $key : string
Return values
—hasGroup()
public
static hasGroup(string $key) :
Parameters
- $key : string
Return values
—offsetExists()
public
static offsetExists(string $key) :
Parameters
- $key : string
Return values
—offsetGet()
public
static offsetGet(string $key) :
Parameters
- $key : string
Return values
—offsetSet()
public
static offsetSet(string $key, mixed $value) :
Parameters
- $key : string
- $value : mixed
Return values
—offsetUnset()
public
static offsetUnset(string $key) :
Parameters
- $key : string
Return values
—package()
public
static package(string $namespace, string $hint) :
Parameters
- $namespace : string
- $hint : string
Return values
—parseConfigKey()
public
static parseConfigKey(string $key) :
Parameters
- $key : string
Return values
—prepend()
public
static prepend(string $key, mixed $value) :
Parameters
- $key : string
- $value : mixed
Return values
—push()
public
static push(string $key, mixed $value) :
Parameters
- $key : string
- $value : mixed
Return values
—set()
public
static set(array<string|int, mixed>|string $key, mixed $value) :
Parameters
- $key : array<string|int, mixed>|string
- $value : mixed
Return values
—setFacadeApplication()
Set the application instance.
public
static setFacadeApplication(Application $app) : void
Parameters
- $app : Application
Return values
void —setLoader()
public
static setLoader(LoaderInterface $loader) :
Parameters
- $loader : LoaderInterface
Return values
—shouldReceive()
Initiate a mock expectation on the facade.
public
static shouldReceive() : Expectation
Return values
Expectation —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 —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