DriverManager
in package
implements
DriverManagerInterface
Driver manager
Table of Contents
Interfaces
- DriverManagerInterface
- Driver Manager Interface
Properties
- $driverRegistry : DriverRegistryInterface
- Driver registry adapter
Methods
- __construct() : mixed
- Constructor
- create() : DriverInterface|null
- Create driver
- disable() : bool
- Disable driver
- enable() : bool
- Enable driver
- getConfig() : Properties
- Get driver config
- getDriver() : object|false
- Get driver
- getList() : array<string|int, mixed>
- Get drivers list
- has() : bool
- Return true if driver exsits
- install() : bool
- Install driver
- saveConfig() : bool
- Save driver config
- unInstall() : bool
- Uninstall driver
- getDriverParams() : array<string|int, mixed>|null
- Get driver params
Properties
$driverRegistry
Driver registry adapter
protected
DriverRegistryInterface
$driverRegistry
Methods
__construct()
Constructor
public
__construct(DriverRegistryInterface $driverRegistry) : mixed
Parameters
- $driverRegistry : DriverRegistryInterface
create()
Create driver
public
create(string $name[, array<string|int, mixed> $options = [] ][, array<string|int, mixed>|null $config = null ]) : DriverInterface|null
Parameters
- $name : string
-
Driver name
- $options : array<string|int, mixed> = []
- $config : array<string|int, mixed>|null = null
-
Drievr config properties
Return values
DriverInterface|nulldisable()
Disable driver
public
disable(string $name) : bool
Parameters
- $name : string
Return values
boolenable()
Enable driver
public
enable(string $name) : bool
Parameters
- $name : string
Return values
boolgetConfig()
Get driver config
public
getConfig(string $name) : Properties
Parameters
- $name : string
-
Driver name
Return values
PropertiesgetDriver()
Get driver
public
getDriver(string $name) : object|false
Parameters
- $name : string
-
Driver name
Return values
object|falsegetList()
Get drivers list
public
getList([string|null $category = null ][, int|null $status = null ]) : array<string|int, mixed>
Parameters
- $category : string|null = null
- $status : int|null = null
Return values
array<string|int, mixed>has()
Return true if driver exsits
public
has(string $name) : bool
Parameters
- $name : string
-
Driver name
Return values
boolinstall()
Install driver
public
install(string|object $name[, string|null $class = null ][, string|null $category = null ][, string|null $title = null ][, string|null $description = null ][, string|null $version = null ][, array<string|int, mixed> $config = [] ][, string|null $packageName = null ][, string|null $packageType = null ]) : bool
Parameters
- $name : string|object
-
Driver name
- $class : string|null = null
-
full class name or driver object ref
- $category : string|null = null
- $title : string|null = null
- $description : string|null = null
- $version : string|null = null
- $config : array<string|int, mixed> = []
- $packageName : string|null = null
- $packageType : string|null = null
Return values
boolsaveConfig()
Save driver config
public
saveConfig(string $name, array<string|int, mixed>|object $config) : bool
Parameters
- $name : string
-
Driver name
- $config : array<string|int, mixed>|object
Return values
boolunInstall()
Uninstall driver
public
unInstall(string $name) : bool
Parameters
- $name : string
-
Driver name
Return values
boolgetDriverParams()
Get driver params
protected
getDriverParams(string|object $driver) : array<string|int, mixed>|null
Parameters
- $driver : string|object
-
Driver obj ref or driver class