172 lines
4.1 KiB
YAML
172 lines
4.1 KiB
YAML
|
name: MultipleInstanceManager
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: Closure
|
||
|
type: class
|
||
|
source: Closure
|
||
|
- name: InvalidArgumentException
|
||
|
type: class
|
||
|
source: InvalidArgumentException
|
||
|
- name: RuntimeException
|
||
|
type: class
|
||
|
source: RuntimeException
|
||
|
properties:
|
||
|
- name: app
|
||
|
visibility: protected
|
||
|
comment: '# * The application instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Illuminate\Contracts\Foundation\Application'
|
||
|
- name: config
|
||
|
visibility: protected
|
||
|
comment: '# * The configuration repository instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Illuminate\Contracts\Config\Repository'
|
||
|
- name: instances
|
||
|
visibility: protected
|
||
|
comment: '# * The array of resolved instances.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var array'
|
||
|
- name: customCreators
|
||
|
visibility: protected
|
||
|
comment: '# * The registered custom instance creators.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var array'
|
||
|
- name: driverKey
|
||
|
visibility: protected
|
||
|
comment: '# * The key name of the "driver" equivalent configuration option.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: app
|
||
|
comment: "# * The application instance.\n# *\n# * @var \\Illuminate\\Contracts\\\
|
||
|
Foundation\\Application\n# */\n# protected $app;\n# \n# /**\n# * The configuration\
|
||
|
\ repository instance.\n# *\n# * @var \\Illuminate\\Contracts\\Config\\Repository\n\
|
||
|
# */\n# protected $config;\n# \n# /**\n# * The array of resolved instances.\n\
|
||
|
# *\n# * @var array\n# */\n# protected $instances = [];\n# \n# /**\n# * The registered\
|
||
|
\ custom instance creators.\n# *\n# * @var array\n# */\n# protected $customCreators\
|
||
|
\ = [];\n# \n# /**\n# * The key name of the \"driver\" equivalent configuration\
|
||
|
\ option.\n# *\n# * @var string\n# */\n# protected $driverKey = 'driver';\n# \n\
|
||
|
# /**\n# * Create a new manager instance.\n# *\n# * @param \\Illuminate\\Contracts\\\
|
||
|
Foundation\\Application $app\n# * @return void"
|
||
|
- name: instance
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: name
|
||
|
default: 'null'
|
||
|
comment: "# * Get the default instance name.\n# *\n# * @return string\n# */\n# abstract\
|
||
|
\ public function getDefaultInstance();\n# \n# /**\n# * Set the default instance\
|
||
|
\ name.\n# *\n# * @param string $name\n# * @return void\n# */\n# abstract public\
|
||
|
\ function setDefaultInstance($name);\n# \n# /**\n# * Get the instance specific\
|
||
|
\ configuration.\n# *\n# * @param string $name\n# * @return array\n# */\n# abstract\
|
||
|
\ public function getInstanceConfig($name);\n# \n# /**\n# * Get an instance by\
|
||
|
\ name.\n# *\n# * @param string|null $name\n# * @return mixed"
|
||
|
- name: get
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: name
|
||
|
comment: '# * Attempt to get an instance from the local cache.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $name
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: resolve
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: name
|
||
|
comment: '# * Resolve the given instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $name
|
||
|
|
||
|
# * @return mixed
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @throws \InvalidArgumentException
|
||
|
|
||
|
# * @throws \RuntimeException'
|
||
|
- name: callCustomCreator
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: config
|
||
|
comment: '# * Call a custom instance creator.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param array $config
|
||
|
|
||
|
# * @return mixed'
|
||
|
- name: forgetInstance
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: name
|
||
|
default: 'null'
|
||
|
comment: '# * Unset the given instances.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param array|string|null $name
|
||
|
|
||
|
# * @return $this'
|
||
|
- name: purge
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: name
|
||
|
default: 'null'
|
||
|
comment: '# * Disconnect the given instance and remove from local cache.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string|null $name
|
||
|
|
||
|
# * @return void'
|
||
|
- name: extend
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: name
|
||
|
- name: callback
|
||
|
comment: '# * Register a custom instance creator Closure.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $name
|
||
|
|
||
|
# * @param \Closure $callback
|
||
|
|
||
|
# * @return $this'
|
||
|
- name: __call
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: method
|
||
|
- name: parameters
|
||
|
comment: '# * Dynamically call the default instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $method
|
||
|
|
||
|
# * @param array $parameters
|
||
|
|
||
|
# * @return mixed'
|
||
|
traits:
|
||
|
- Closure
|
||
|
- InvalidArgumentException
|
||
|
- RuntimeException
|
||
|
interfaces: []
|