Provider for integrate Idiorm and Paris with Silex
$app->register(new FranMoreno\Silex\Provider\ParisServiceProvider());
$app['idiorm.config'] = array(
'connection_string' => 'mysql:host=localhost;dbname=my_database',
'username' => 'database_user',
'password' => 'top_secret'
);
$app['paris.model.prefix'] = '\\My\\Model\\';
$app->get('/index', function (Request $request) use ($app) {
$userFactory = $app['paris']->getModel('User');
$results = $userFactory->find_many();
return $app['twig']->render('index.html', array(
'results' => $results
));
})