ConcurrencyManager
class ConcurrencyManager extends MultipleInstanceManager mixin Driver (View source)
Properties
protected Application | $app | The application instance. |
from MultipleInstanceManager |
protected Repository | $config | The configuration repository instance. |
from MultipleInstanceManager |
protected array | $instances | The array of resolved instances. |
from MultipleInstanceManager |
protected array | $customCreators | The registered custom instance creators. |
from MultipleInstanceManager |
protected string | $driverKey | The key name of the "driver" equivalent configuration option. |
from MultipleInstanceManager |
Methods
Get the default instance name.
Set the default instance name.
Get the instance specific configuration.
Attempt to get an instance from the local cache.
Unset the given instances.
Disconnect the given instance and remove from local cache.
Dynamically call the default instance.
Get a driver instance by name.
Create an instance of the process concurrency driver.
Create an instance of the fork concurrency driver.
Create an instance of the sync concurrency driver.
Details
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.
protected mixed
get(string $name)
Attempt to get an instance from the local cache.
protected mixed
resolve(string $name)
Resolve the given instance.
protected 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.
$this
setApplication(Application $app)
Set the application instance used by the manager.
mixed
__call(string $method, array $parameters)
Dynamically call the default instance.
mixed
driver(string|null $name = null)
Get a driver instance by name.
ProcessDriver
createProcessDriver(array $config)
Create an instance of the process concurrency driver.
ForkDriver
createForkDriver(array $config)
Create an instance of the fork concurrency driver.
SyncDriver
createSyncDriver(array $config)
Create an instance of the sync concurrency driver.