// Set the configuration options $config = [ 'database' => [ 'connections' => [ 'default' => [ 'adapter' => 'mysql', 'dsn' => 'mysql:host=localhost;dbname=mydatabase', 'user' => 'myuser', 'password' => 'mypassword', ], ], ], 'runtime' => [ 'defaultConnection' => 'default', 'connections' => ['default'], ], ]; // Set the configuration Propel::setConfiguration($config); // Initialize Propel Propel::initialize();
// Set the configuration options $config = [ 'database' => [ 'connections' => [ 'sqlite' => [ 'adapter' => 'sqlite', 'dsn' => 'sqlite:/path/to/database.db', ], ], ], 'runtime' => [ 'defaultConnection' => 'sqlite', 'connections' => ['sqlite'], ], ]; // Set the configuration \Propel\Runtime\Propel::setConfiguration($config); // Initialize Propel \Propel\Runtime\Propel::initialize();This example sets the database connection options for SQLite and configures Propel to use the `sqlite` connection. Package library: `propel/runtime`.