Usage:
R::addDatabase( 'database-1', 'sqlite:/tmp/db1.txt' );
R::selectDatabase( 'database-1' ); //to select database again
This method allows you to dynamically add (and select) new databases
to the facade. Adding a database with the same key will cause an exception. public static addDatabase ( string $key, string $dsn, string $user = NULL, null | string $pass = NULL, boolean $frozen = FALSE ) : void | ||
$key | string | ID for the database |
$dsn | string | DSN for the database |
$user | string | user for connection |
$pass | null | string | password for connection |
$frozen | boolean | whether this database is frozen or not |
return | void |