abstract class MultipleInstanceManager (View source)
| 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. |
| void | __construct(Application $app)
Create a new manager instance. | |
| 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 | extend(string $name, Closure $callback)
Register a custom instance creator Closure. | |
| mixed | __call(string $method, array $parameters)
Dynamically call the default instance. |
Create a new manager instance.
Get the default instance name.
Set the default instance name.
Get the instance specific configuration.
Get an instance by name.
Attempt to get an instance from the local cache.
Resolve the given instance.
Call a custom instance creator.
Unset the given instances.
Disconnect the given instance and remove from local cache.
Register a custom instance creator Closure.
Dynamically call the default instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Support/MultipleInstanceManager.html