class Illuminate / Support / MultipleInstanceManager
You are viewing an older version of the documentation. For the latest, please visit master documentation.
abstract

MultipleInstanceManager

Properties

protected

$app Application

The application instance.

Default: null
protected

$instances array

The array of resolved instances.

Default: []
protected

$customCreators array

The registered custom instance creators.

Default: []

Methods

public

__construct ( $app ) : void

Create a new manager instance.

Parameters

public abstract

getDefaultInstance ( ) : string

Get the default instance name.

public abstract

setDefaultInstance ( $name ) : void

Set the default instance name.

Parameters

  • $name string
public abstract

getInstanceConfig ( $name ) : array

Get the instance specific configuration.

Parameters

  • $name string
public

instance ( $name ) : mixed

Get an instance instance by name.

Parameters

  • $name string|null
protected

get ( $name ) : mixed

Attempt to get an instance from the local cache.

Parameters

  • $name string
protected

resolve ( $name ) : mixed

Resolve the given instance.

Parameters

  • $name string
protected

callCustomCreator ( array $config ) : mixed

Call a custom instance creator.

Parameters

  • $config array
public

forgetInstance ( $name ) : $this

Unset the given instances.

Parameters

  • $name array|string|null
public

purge ( $name ) : void

Disconnect the given instance and remove from local cache.

Parameters

  • $name string|null
public

extend ( $name , Closure $callback ) : $this

Register a custom instance creator Closure.

Parameters

public

__call ( $method , $parameters ) : mixed

Dynamically call the default instance.

Parameters

  • $method string
  • $parameters array