MultipleInstanceManager
abstract class MultipleInstanceManager (View source)
Properties
protected Application | $app | The application instance. |
|
protected Repository | $config | The configuration repository instance. |
|
protected array | $instances | The array of resolved instances. |
|
protected array | $customCreators | The registered custom instance creators. |
|
protected string | $driverKey | The key name of the "driver" equivalent configuration option. |
Methods
string
getDefaultInstance()
Get the default instance name.
void
setDefaultInstance(string $name)
Set the default instance name.
array
getInstanceConfig(string $name)
Get the instance specific configuration.
mixed
instance(string|null $name = null)
Get an instance by name.
mixed
get(string $name)
Attempt to get an instance from the local cache.
mixed
resolve(string $name)
Resolve the given instance.
mixed
callCustomCreator(array $config)
Call a custom instance creator.
$this
forgetInstance(array|string|null $name = null)
Unset the given instances.
void
purge(string|null $name = null)
Disconnect the given instance and remove from local cache.
$this
mixed
__call(string $method, array $parameters)
Dynamically call the default instance.