# DB

class DB

## Constants

BACKUP_BASED_ON_DAY | Backup const
BACKUP_BASED_ON_LAST_ITEM |

## Methods

static PDO|MySQLi
getInstance(string $driver = 'pdo', $connectionName = '')

An method to get database instance based on database driver PDO | MySQLi

static Mysqldump
backup()

Create MySQLDump instance with default profile provide by this Object.

static void
connection(string $name, string $driver = 'pdo')

Switching database connection

static bool
hasBackup($by = self::BACKUP_BASED_ON_DAY)

Undocumented function

static
getCredential(string $name)

No description

static
registerExtension(string $name, string $class, object|null $instance = null)

No description

static
__callStatic($method, $params)

No description

## Details

###
at line 86
`static PDO|MySQLi getInstance(string $driver = 'pdo', $connectionName = '')`

An method to get database instance based on database driver PDO | MySQLi

#### Parameters

string | $driver |
| $connectionName |

#### Return Value

PDO|MySQLi |

###
at line 116
`static Mysqldump backup()`

Create MySQLDump instance with default profile provide by this Object.

#### Return Value

Mysqldump |

###
at line 128
`static void connection(string $name, string $driver = 'pdo')`

Switching database connection

#### Parameters

string | $name |
string | $driver |

#### Return Value

void |

###
at line 149
`static bool hasBackup($by = self::BACKUP_BASED_ON_DAY)`

Undocumented function

#### Parameters

| $by |

#### Return Value

bool |

###
at line 205
`static getCredential(string $name)`

No description

#### Parameters

string | $name |

###
at line 225
`static registerExtension(string $name, string $class, object|null $instance = null)`

No description

#### Parameters

string | $name |
string | $class |
object|null | $instance |

###
at line 254
`static __callStatic($method, $params)`

No description

#### Parameters

| $method |
| $params |