class
Illuminate
/
Support
/
MultipleInstanceManager
abstract
MultipleInstanceManager
Properties
protected
$instances array
The array of resolved instances.
Default: []
protected
$customCreators array
The registered custom instance creators.
Default: []
Methods
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
- $name string
- $callback Closure
public
__call ( $method , $parameters ) : mixed
Dynamically call the default instance.
Parameters
- $method string
- $parameters array