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 in the container.

mixed
instance(string $abstract, mixed $instance)

Register an instance 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)

Return empty asset markup.

mixed
__call(string $method, array $parameters)

Return an empty result for dynamic calls.

string
__toString()

Return empty asset markup as a string.

useIntegrityKey(string|false $key)

Ignore integrity key configuration.

useBuildDirectory(string $path)

Ignore build directory configuration.

useHotFile(string $path)

Ignore hot file configuration.

withEntryPoints(array $entryPoints)

Ignore entry point configuration.

useScriptTagAttributes(array|callable $attributes)

Ignore script tag attributes.

useStyleTagAttributes(array|callable $attributes)

Ignore style tag attributes.

usePreloadTagAttributes(array|callable|false $attributes)

Ignore preload tag attributes.

array
preloadedAssets()

Return an empty list of preloaded assets.

reactRefresh()

Return empty React refresh markup.

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

Return empty asset content.

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

Return an empty asset URL.

Details

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

Register an instance in the container.

Parameters

string $abstract
mixed $instance

Return Value

mixed

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

Register an instance in the container.

Parameters

string $abstract
mixed $instance

Return Value

mixed

at line 63
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 76
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 89
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 99
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 111
protected InteractsWithContainer withoutVite()

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

Return Value

InteractsWithContainer

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

Return empty asset markup.

Parameters

string|array $entrypoints
string|null $buildDirectory

Return Value

HtmlString

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

Return an empty result for dynamic calls.

Parameters

string $method
array $parameters

Return Value

mixed

at line 139
string __toString()

Return empty asset markup as a string.

Return Value

string

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

Ignore integrity key configuration.

Parameters

string|false $key

Return Value

InteractsWithContainer

at line 155
InteractsWithContainer useBuildDirectory(string $path)

Ignore build directory configuration.

Parameters

string $path

Return Value

InteractsWithContainer

at line 163
InteractsWithContainer useHotFile(string $path)

Ignore hot file configuration.

Parameters

string $path

Return Value

InteractsWithContainer

at line 171
InteractsWithContainer withEntryPoints(array $entryPoints)

Ignore entry point configuration.

Parameters

array $entryPoints

Return Value

InteractsWithContainer

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

Ignore script tag attributes.

Parameters

array|callable $attributes

Return Value

InteractsWithContainer

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

Ignore style tag attributes.

Parameters

array|callable $attributes

Return Value

InteractsWithContainer

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

Ignore preload tag attributes.

Parameters

array|callable|false $attributes

Return Value

InteractsWithContainer

at line 203
array preloadedAssets()

Return an empty list of preloaded assets.

Return Value

array

at line 211
HtmlString reactRefresh()

Return empty React refresh markup.

Return Value

HtmlString

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

Return empty asset content.

Parameters

string $asset
string|null $buildDirectory

Return Value

string

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

Return an empty asset URL.

Parameters

string $asset
string|null $buildDirectory

Return Value

string