How to use multiple databases connections in Silex?

Necessary in the project with silex + doctrine2 to share connections to the database for writing and reading. in the Internet there are ways to configure like:

$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
 'dbs.options' => array (
 'mysql_read' => array(
 'driver' => 'pdo_mysql',
 'host' => 'mysql_read.someplace.tld',
 'dbname' => 'my_database',
 'user' => 'my_username',
 'password' => 'my_password',
 'charset' => 'utf8mb4',
),
 'mysql_write' => array(
 'driver' => 'pdo_mysql',
 'host' => 'mysql_write.someplace.tld',
 'dbname' => 'my_database',
 'user' => 'my_username',
 'password' => 'my_password',
 'charset' => 'utf8mb4',
),
),
 ));

how to work with using an ORM is not clear.
July 9th 19 at 13:12

Find more questions by tags Doctrine ORMPHPSilex