hasDatabase() public static method

Determines whether a database identified with the specified key has already been added to the facade. This function will return TRUE if the database indicated by the key is available and FALSE otherwise.
public static hasDatabase ( string $key ) : boolean
$key string the key/name of the database to check for
return boolean
Example #1
0
 /**
  * Tests the hasDatabase() method.
  *
  * @return void
  */
 public function testDatabaseCheck()
 {
     R::addDatabase('key1', 'mysql:dsn1', 'user1', 'password1', TRUE);
     asrt(R::hasDatabase('key1'), TRUE);
     asrt(R::hasDatabase('key2'), FALSE);
 }