'mysql:host=localhost;dbname=my_database', 'user' => 'my_username', 'password' => 'my_password', 'driver' => 'pdo_mysql' ]); // get the configuration settings $config = Propel::getConfiguration(); ?>
'mysql:host=localhost;dbname=my_database', 'user' => 'my_username', 'password' => 'my_password', 'driver' => 'pdo_mysql' ]); // change the database connection settings $newConfig = [ 'dsn' => 'mysql:host=otherhost;dbname=other_database', 'user' => 'other_username', 'password' => 'other_password', 'driver' => 'pdo_mysql' ]; Propel::setConfiguration($newConfig); // get the current configuration settings $config = Propel::getConfiguration(); ?>In this example, we initially configure Propel to use a MySQL database and then later change the settings to use a different MySQL database. We use the setConfiguration method to update the configuration and then get the current configuration using the getConfiguration method. Package library: Propel ORM