class Illuminate / Support / Facades / Facade
You are viewing an older version of the documentation. For the latest, please visit master documentation.
abstract

Facade

Properties

protected static

$app Application

The application instance being facaded.

Default: null
protected static

$resolvedInstance array

The resolved object instances.

Default: null

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.

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
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 object|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

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