class Database extends AbstractDriver

Properties

protected array $config

Driver config

from  AbstractDriver
protected DatabaseManager $database

Database manager instance.

Methods

__construct(array $config)

Create a new driver instance.

mixed
config(string $key, mixed $default = null)

Get configuration value.

bool
create(array $params)

Create a new currency.

array
all()

Get all currencies.

mixed
find(string $code, int $active = 1)

Get given currency from storage.

int
update(string $code, array $attributes, DateTime $timestamp = null)

Update given currency.

int
delete($code)

Remove given currency from storage.

Details

at line 23
__construct(array $config)

Create a new driver instance.

Parameters

array $config

in AbstractDriver at line 35
protected mixed config(string $key, mixed $default = null)

Get configuration value.

Parameters

string $key
mixed $default

Return Value

mixed

at line 33
bool create(array $params)

Create a new currency.

Parameters

array $params

Return Value

bool

at line 60
array all()

Get all currencies.

Return Value

array

at line 88
mixed find(string $code, int $active = 1)

Get given currency from storage.

Parameters

string $code
int $active

Return Value

mixed

at line 104
int update(string $code, array $attributes, DateTime $timestamp = null)

Update given currency.

Parameters

string $code
array $attributes
DateTime $timestamp

Return Value

int

at line 121
int delete($code)

Remove given currency from storage.

Parameters

$code

Return Value

int