class DriverManager implements DriverManagerInterface

Driver manager

Properties

protected DriverRegistryInterface $driverRegistry Driver registry adapter

Methods

__construct(DriverRegistryInterface $driverRegistry)

Constructor

create(string $name, array $options = [], array|null $config = null)

Create driver

bool
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 $config = [], string|null $extension = null)

Install driver

array|false
getDriverParams(string|object $driver)

Get driver params

bool
unInstall(string $name)

Uninstall driver

bool
has(string $name)

Return true if driver exsits

object|false
getDriver(string $name)

Get driver

bool
saveConfig(string $name, array|object $config)

Save driver config

Properties
getConfig(string $name)

Get driver config

array
getList(string|null $category = null, int|null $status = null)

Get drivers list

bool
enable(string $name)

Enable driver

bool
disable(string $name)

Disable driver

Details

at line 36
__construct(DriverRegistryInterface $driverRegistry)

Constructor

Parameters

DriverRegistryInterface $driverRegistry

at line 49
DriverInterface|false create(string $name, array $options = [], array|null $config = null)

Create driver

Parameters

string $name Driver name
array $options
array|null $config Drievr config properties

Return Value

DriverInterface|false

at line 83
bool 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 $config = [], string|null $extension = null)

Install driver

Parameters

string|object $name Driver name
string|null $class full class name or driver object ref
string|null $category
string|null $title
string|null $description
string|null $version
array $config
string|null $extension

Return Value

bool

at line 118
protected array|false getDriverParams(string|object $driver)

Get driver params

Parameters

string|object $driver Driver obj ref or driver class

Return Value

array|false

at line 151
bool unInstall(string $name)

Uninstall driver

Parameters

string $name Driver name

Return Value

bool

at line 162
bool has(string $name)

Return true if driver exsits

Parameters

string $name Driver name

Return Value

bool

at line 173
object|false getDriver(string $name)

Get driver

Parameters

string $name Driver name

Return Value

object|false

at line 185
bool saveConfig(string $name, array|object $config)

Save driver config

Parameters

string $name Driver name
array|object $config

Return Value

bool

at line 198
Properties getConfig(string $name)

Get driver config

Parameters

string $name Driver name

Return Value

Properties

at line 212
array getList(string|null $category = null, int|null $status = null)

Get drivers list

Parameters

string|null $category
int|null $status

Return Value

array

at line 223
bool enable(string $name)

Enable driver

Parameters

string $name

Return Value

bool

at line 234
bool disable(string $name)

Disable driver

Parameters

string $name

Return Value

bool