PHP Class Illuminate\Support\Facades\Facade

Afficher le fichier Open project: illuminate/support Class Usage Examples

Protected Properties

Свойство Type Description
$app Illuminate\Contracts\Foundation\Application The application instance being facaded.
$resolvedInstance array The resolved object instances.

Méthodes publiques

Méthode Description
__callStatic ( string $method, array $args ) : mixed Handle dynamic, static calls to the object.
clearResolvedInstance ( string $name ) : void Clear a resolved facade instance.
clearResolvedInstances ( ) : void Clear all of the resolved instances.
getFacadeApplication ( ) : Illuminate\Contracts\Foundation\Application Get the application instance behind the facade.
getFacadeRoot ( ) : mixed Get the root object behind the facade.
setFacadeApplication ( Illuminate\Contracts\Foundation\Application $app ) : void Set the application instance.
shouldReceive ( ) : Expectation Initiate a mock expectation on the facade.
spy ( ) : void Convert the facade into a Mockery spy.
swap ( mixed $instance ) : void Hotswap the underlying instance behind the facade.

Méthodes protégées

Méthode Description
createFreshMockInstance ( string $name ) : Expectation Create a fresh mock instance for the given class.
createMockByName ( string $name ) : Mockery\MockInterface Create a fresh mock instance for the given class.
getFacadeAccessor ( ) : string Get the registered name of the component.
getMockableClass ( ) : string | null Get the mockable class for the bound instance.
isMock ( ) : boolean Determines whether a mock is set as the instance of the facade.
resolveFacadeInstance ( string | object $name ) : mixed Resolve the facade root instance from the container.

Method Details

__callStatic() public static méthode

Handle dynamic, static calls to the object.
public static __callStatic ( string $method, array $args ) : mixed
$method string
$args array
Résultat mixed

clearResolvedInstance() public static méthode

Clear a resolved facade instance.
public static clearResolvedInstance ( string $name ) : void
$name string
Résultat void

clearResolvedInstances() public static méthode

Clear all of the resolved instances.
public static clearResolvedInstances ( ) : void
Résultat void

createFreshMockInstance() protected static méthode

Create a fresh mock instance for the given class.
protected static createFreshMockInstance ( string $name ) : Expectation
$name string
Résultat Mockery\Expectation

createMockByName() protected static méthode

Create a fresh mock instance for the given class.
protected static createMockByName ( string $name ) : Mockery\MockInterface
$name string
Résultat Mockery\MockInterface

getFacadeAccessor() protected static méthode

Get the registered name of the component.
protected static getFacadeAccessor ( ) : string
Résultat string

getFacadeApplication() public static méthode

Get the application instance behind the facade.
public static getFacadeApplication ( ) : Illuminate\Contracts\Foundation\Application
Résultat Illuminate\Contracts\Foundation\Application

getFacadeRoot() public static méthode

Get the root object behind the facade.
public static getFacadeRoot ( ) : mixed
Résultat mixed

getMockableClass() protected static méthode

Get the mockable class for the bound instance.
protected static getMockableClass ( ) : string | null
Résultat string | null

isMock() protected static méthode

Determines whether a mock is set as the instance of the facade.
protected static isMock ( ) : boolean
Résultat boolean

resolveFacadeInstance() protected static méthode

Resolve the facade root instance from the container.
protected static resolveFacadeInstance ( string | object $name ) : mixed
$name string | object
Résultat mixed

setFacadeApplication() public static méthode

Set the application instance.
public static setFacadeApplication ( Illuminate\Contracts\Foundation\Application $app ) : void
$app Illuminate\Contracts\Foundation\Application
Résultat void

shouldReceive() public static méthode

Initiate a mock expectation on the facade.
public static shouldReceive ( ) : Expectation
Résultat Mockery\Expectation

spy() public static méthode

Convert the facade into a Mockery spy.
public static spy ( ) : void
Résultat void

swap() public static méthode

Hotswap the underlying instance behind the facade.
public static swap ( mixed $instance ) : void
$instance mixed
Résultat void

Property Details

$app protected_oe static_oe property

The application instance being facaded.
protected static Application,Illuminate\Contracts\Foundation $app
Résultat Illuminate\Contracts\Foundation\Application

$resolvedInstance protected_oe static_oe property

The resolved object instances.
protected static array $resolvedInstance
Résultat array