trait InteractsWithContainer

Properties

protected Vite|null $originalVite

The original Vite handler.

protected DeferredCallbackCollection|null $originalDeferredCallbacksCollection

The original deferred callbacks collection.

Methods

mixed
swap(string $abstract, mixed $instance)

Register an instance of an object in the container.

mixed
instance(string $abstract, mixed $instance)

Register an instance of an object in the container.

MockInterface
mock(string $abstract, Closure|null $mock = null)

Mock an instance of an object in the container.

MockInterface
partialMock(string $abstract, Closure|null $mock = null)

Mock a partial instance of an object in the container.

MockInterface
spy(string $abstract, Closure|null $mock = null)

Spy an instance of an object in the container.

forgetMock(string $abstract)

Instruct the container to forget a previously mocked / spied instance of an object.

withoutVite()

Register a Vite handler that returns empty strings for all assets.

__invoke(string|array $entrypoints, string|null $buildDirectory = null)

No description

mixed
__call(string $method, array $parameters)

No description

string
__toString()

No description

useIntegrityKey(string|false $key)

No description

useBuildDirectory(string $path)

No description

useHotFile(string $path)

No description

withEntryPoints(array $entryPoints)

No description

useScriptTagAttributes(array|callable $attributes)

No description

useStyleTagAttributes(array|callable $attributes)

No description

usePreloadTagAttributes(array|callable|false $attributes)

No description

array
preloadedAssets()

No description

reactRefresh()

No description

string
content(string $asset, string|null $buildDirectory = null)

No description

string
asset(string $asset, string|null $buildDirectory = null)

No description

Details

at line 33
protected mixed swap(string $abstract, mixed $instance)

Register an instance of an object in the container.

Parameters

string $abstract
mixed $instance

Return Value

mixed

at line 44
protected mixed instance(string $abstract, mixed $instance)

Register an instance of an object in the container.

Parameters

string $abstract
mixed $instance

Return Value

mixed

at line 55
protected MockInterface mock(string $abstract, Closure|null $mock = null)

Mock an instance of an object in the container.

Parameters

string $abstract
Closure|null $mock

Return Value

MockInterface

at line 63
protected MockInterface partialMock(string $abstract, Closure|null $mock = null)

Mock a partial instance of an object in the container.

Parameters

string $abstract
Closure|null $mock

Return Value

MockInterface

at line 71
protected MockInterface spy(string $abstract, Closure|null $mock = null)

Spy an instance of an object in the container.

Parameters

string $abstract
Closure|null $mock

Return Value

MockInterface

at line 81
protected InteractsWithContainer forgetMock(string $abstract)

Instruct the container to forget a previously mocked / spied instance of an object.

Parameters

string $abstract

Return Value

InteractsWithContainer

at line 93
protected InteractsWithContainer withoutVite()

Register a Vite handler that returns empty strings for all assets.

Return Value

InteractsWithContainer

at line 102
HtmlString __invoke(string|array $entrypoints, string|null $buildDirectory = null)

No description

Parameters

string|array $entrypoints
string|null $buildDirectory

Return Value

HtmlString

at line 107
mixed __call(string $method, array $parameters)

No description

Parameters

string $method
array $parameters

Return Value

mixed

at line 112
string __toString()

No description

Return Value

string

at line 117
InteractsWithContainer useIntegrityKey(string|false $key)

No description

Parameters

string|false $key

Return Value

InteractsWithContainer

at line 122
InteractsWithContainer useBuildDirectory(string $path)

No description

Parameters

string $path

Return Value

InteractsWithContainer

at line 127
InteractsWithContainer useHotFile(string $path)

No description

Parameters

string $path

Return Value

InteractsWithContainer

at line 132
InteractsWithContainer withEntryPoints(array $entryPoints)

No description

Parameters

array $entryPoints

Return Value

InteractsWithContainer

at line 137
InteractsWithContainer useScriptTagAttributes(array|callable $attributes)

No description

Parameters

array|callable $attributes

Return Value

InteractsWithContainer

at line 142
InteractsWithContainer useStyleTagAttributes(array|callable $attributes)

No description

Parameters

array|callable $attributes

Return Value

InteractsWithContainer

at line 147
InteractsWithContainer usePreloadTagAttributes(array|callable|false $attributes)

No description

Parameters

array|callable|false $attributes

Return Value

InteractsWithContainer

at line 152
array preloadedAssets()

No description

Return Value

array

at line 157
HtmlString reactRefresh()

No description

Return Value

HtmlString

at line 162
string content(string $asset, string|null $buildDirectory = null)

No description

Parameters

string $asset
string|null $buildDirectory

Return Value

string

at line 167
string asset(string $asset, string|null $buildDirectory = null)

No description

Parameters

string $asset
string|null $buildDirectory

Return Value

string