Extends
Members
(static) dependencies :Array.<string>
Class dependencies:
['app', 'config']
.
Methods
resolve(storeopt)
Resolve cache store by name.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
store |
string |
<optional> |
The store name. |
Throws:
-
Indicates that the driver could not be resolved.
- Type
- TypeError
Returns:
The Driver instance.
resolveDefault()
Resolve default store.
Returns:
The default driver instance.
build(driver, configopt)
Build store by driver name and by configuration.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
driver |
string | The driver name. | ||
config |
object.<string, *> |
<optional> |
{}
|
The driver configuration. |
Returns:
The driver instance.
getForward()
Get default cache store driver for forward calls.
Returns:
The default driver instance.
driver(nameopt, parametersopt)
- Source:
- Overrides:
Get loader driver by name.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string |
<optional> |
"default"
|
The driver name. |
parameters |
object |
<optional> |
{}
|
The additional parameters to inject into the driver instance. |
Returns:
The resolved driver instance.
- Type
- object
bootDriver(driver, name)
- Source:
- Overrides:
Boot newly created driver.
Parameters:
Name | Type | Description |
---|---|---|
driver |
* | The driver instance. |
name |
string | The driver name. |
Returns:
The driver instance.
- Type
- *
addDriver(name, driver)
- Source:
- Overrides:
Add a driver and bind it with the given name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The driver name. |
driver |
function | The driver class or factory. |
setDefaultDriver(name)
- Source:
- Overrides:
Set given driver name as the default driver.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The driver name. |
setDriverAlias(name, alias)
- Source:
- Overrides:
Give driver an alias name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The driver name. |
alias |
string | The driver alias. |
hasDriver(name)
- Source:
- Overrides:
Check if driver exists.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The driver name. |
Returns:
Indicates that the driver exists.
- Type
- boolean
isDriverAlias(name)
- Source:
- Overrides:
Check if given driver name is an alias.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The driver alias name. |
Returns:
Indicates that the alias exists.
- Type
- boolean