Skip to content

Commit 8edaebf

Browse files
committed
Add class Database
The class Database is now used when the user creates a connection with a database. On each connection, a new Database instance will be created.
1 parent bad398c commit 8edaebf

File tree

5 files changed

+1278
-1226
lines changed

5 files changed

+1278
-1226
lines changed

src/JSONDB/Cache.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ class Cache
6060
/**
6161
* Cache __constructor.
6262
*
63-
* @param JSONDB $db JSONDB instance to use with Cache
63+
* @param Database $db Database instance to use with Cache
6464
* @return Cache
6565
*/
66-
public function __construct(JSONDB $db)
66+
public function __construct(Database $db)
6767
{
6868
$this->setDatabase($db);
6969
}
7070

7171
/**
72-
* Changes the JSONDB instance used
72+
* Changes the Database instance used
7373
*
74-
* @param JSONDB $database JSONDB class' instance
74+
* @param Database $database Database class' instance
7575
* @return Cache
7676
*/
77-
public function setDatabase($database)
77+
public function setDatabase(Database $database)
7878
{
7979
$this->database = $database;
8080
$this->reset();

0 commit comments

Comments
 (0)