trait InteractsWithContainer (View source)

Properties

protected Vite|null $originalVite

The original Vite handler.

protected Mix|null $originalMix

The original Laravel Mix handler.

Methods

object
swap(string $abstract, object $instance)

Register an instance of an object in the container.

object
instance(string $abstract, object $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.

$this
forgetMock(string $abstract)

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

$this
withoutVite()

Register an empty handler for Vite in the container.

__invoke($entrypoints, $buildDirectory = null)

No description

__call($method, $parameters)

No description

__toString()

No description

useIntegrityKey($key)

No description

useBuildDirectory($path)

No description

useHotFile($path)

No description

withEntryPoints($entryPoints)

No description

useScriptTagAttributes($attributes)

No description

useStyleTagAttributes($attributes)

No description

usePreloadTagAttributes($attributes)

No description

preloadedAssets()

No description

reactRefresh()

No description

content($asset, $buildDirectory = null)

No description

asset($asset, $buildDirectory = null)

No description

Details

protected object swap(string $abstract, object $instance)

Register an instance of an object in the container.

Parameters

string $abstract
object $instance

Return Value

object

protected object instance(string $abstract, object $instance)

Register an instance of an object in the container.

Parameters

string $abstract
object $instance

Return Value

object

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

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

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

protected $this forgetMock(string $abstract)

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

Parameters

string $abstract

Return Value

$this

protected $this withoutVite()

Register an empty handler for Vite in the container.

Return Value

$this

__invoke($entrypoints, $buildDirectory = null)

No description

Parameters

$entrypoints
$buildDirectory

__call($method, $parameters)

No description

Parameters

$method
$parameters

__toString()

No description

useIntegrityKey($key)

No description

Parameters

$key

useBuildDirectory($path)

No description

Parameters

$path

useHotFile($path)

No description

Parameters

$path

withEntryPoints($entryPoints)

No description

Parameters

$entryPoints

useScriptTagAttributes($attributes)

No description

Parameters

$attributes

useStyleTagAttributes($attributes)

No description

Parameters

$attributes

usePreloadTagAttributes($attributes)

No description

Parameters

$attributes

preloadedAssets()

No description

reactRefresh()

No description

content($asset, $buildDirectory = null)

No description

Parameters

$asset
$buildDirectory

asset($asset, $buildDirectory = null)

No description

Parameters

$asset
$buildDirectory