PHP Класс Illuminate\Support\Facades\Facade

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$app Illuminate\Contracts\Foundation\Application The application instance being facaded.
$resolvedInstance array The resolved object instances.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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.

Описание методов

__callStatic() публичный статический Метод

Handle dynamic, static calls to the object.
public static __callStatic ( string $method, array $args ) : mixed
$method string
$args array
Результат mixed

clearResolvedInstance() публичный статический Метод

Clear a resolved facade instance.
public static clearResolvedInstance ( string $name ) : void
$name string
Результат void

clearResolvedInstances() публичный статический Метод

Clear all of the resolved instances.
public static clearResolvedInstances ( ) : void
Результат void

createFreshMockInstance() защищенный статический Метод

Create a fresh mock instance for the given class.
protected static createFreshMockInstance ( string $name ) : Expectation
$name string
Результат Mockery\Expectation

createMockByName() защищенный статический Метод

Create a fresh mock instance for the given class.
protected static createMockByName ( string $name ) : Mockery\MockInterface
$name string
Результат Mockery\MockInterface

getFacadeAccessor() защищенный статический Метод

Get the registered name of the component.
protected static getFacadeAccessor ( ) : string
Результат string

getFacadeApplication() публичный статический Метод

Get the application instance behind the facade.
public static getFacadeApplication ( ) : Illuminate\Contracts\Foundation\Application
Результат Illuminate\Contracts\Foundation\Application

getFacadeRoot() публичный статический Метод

Get the root object behind the facade.
public static getFacadeRoot ( ) : mixed
Результат mixed

getMockableClass() защищенный статический Метод

Get the mockable class for the bound instance.
protected static getMockableClass ( ) : string | null
Результат string | null

isMock() защищенный статический Метод

Determines whether a mock is set as the instance of the facade.
protected static isMock ( ) : boolean
Результат boolean

resolveFacadeInstance() защищенный статический Метод

Resolve the facade root instance from the container.
protected static resolveFacadeInstance ( string | object $name ) : mixed
$name string | object
Результат mixed

setFacadeApplication() публичный статический Метод

Set the application instance.
public static setFacadeApplication ( Illuminate\Contracts\Foundation\Application $app ) : void
$app Illuminate\Contracts\Foundation\Application
Результат void

shouldReceive() публичный статический Метод

Initiate a mock expectation on the facade.
public static shouldReceive ( ) : Expectation
Результат Mockery\Expectation

spy() публичный статический Метод

Convert the facade into a Mockery spy.
public static spy ( ) : void
Результат void

swap() публичный статический Метод

Hotswap the underlying instance behind the facade.
public static swap ( mixed $instance ) : void
$instance mixed
Результат void

Описание свойств

$app защищенное статическое свойство

The application instance being facaded.
protected static Application,Illuminate\Contracts\Foundation $app
Результат Illuminate\Contracts\Foundation\Application

$resolvedInstance защищенное статическое свойство

The resolved object instances.
protected static array $resolvedInstance
Результат array