class Illuminate / Support / Facades / Facade
abstract

Facade

Properties

protected static

$app Application

The application instance being facaded.

Default: null
protected static

$resolvedInstance array

The resolved object instances.

Default: null
protected static

$cached bool

Indicates if the resolved instance should be cached.

Default: true

Methods

public static

resolved ( Closure $callback ) : void

Run a Closure when the facade has been resolved.

Parameters

public static

spy ( ) : Mockery\MockInterface

Convert the facade into a Mockery spy.

public static

partialMock ( ) : Mockery\MockInterface

Initiate a partial mock on the facade.

public static

shouldReceive ( ) : Mockery\Expectation

Initiate a mock expectation on the facade.

public static

expects ( ) : Mockery\Expectation

Initiate a mock expectation on the facade.

protected static

createFreshMockInstance ( ) : Mockery\MockInterface

Create a fresh mock instance for the given class.

protected static

createMock ( ) : Mockery\MockInterface

Create a fresh mock instance for the given class.

protected static

isMock ( ) : bool

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

protected static

getMockableClass ( ) : string|null

Get the mockable class for the bound instance.

public static

swap ( $instance ) : void

Hotswap the underlying instance behind the facade.

Parameters

  • $instance mixed
protected static

isFake ( ) : bool

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

public static

getFacadeRoot ( ) : mixed

Get the root object behind the facade.

protected static

getFacadeAccessor ( ) : string

Get the registered name of the component.

protected static

resolveFacadeInstance ( $name ) : mixed

Resolve the facade root instance from the container.

Parameters

  • $name string
public static

clearResolvedInstance ( $name ) : void

Clear a resolved facade instance.

Parameters

  • $name string
public static

clearResolvedInstances ( ) : void

Clear all of the resolved instances.

public static

defaultAliases ( ) : Illuminate\...\Collection

Get the application default aliases.

public static

getFacadeApplication ( ) : Application

Get the application instance behind the facade.

public static

setFacadeApplication ( $app ) : void

Set the application instance.

Parameters

public static

__callStatic ( $method , $args ) : mixed

Handle dynamic, static calls to the object.

Parameters

  • $method string
  • $args array