I'm using one project for many clients, each client has an own
database (security reasons). I am also using database sessions, so
using filters (as in many snippets) for changing database connection
is not possible.

Here is the way i did it: i created a controller (extended
sfFrontWebController) and change the connection settings during
"initialize". This works only with directly changing the datasource
array of propel:

Example:
$c = Propel::getConfiguration();
$c['datasources']['propel']['connection']['dsn'] = ' ... new dsn
setting ...';
Propel::setConfiguration($c);

My question:
Is this the right way to do that (extending controller)? Are there
better ways? I think this is the only point where i can do it BEFORE
the session is started (and after factories are loaded).

And is there a nicer way to change the propel settings? I tried all
snippets (via DatabbaseManager, setConnectionParameter, setParameter,
etc) but none of them worked (why?). Only the three lines above did
the job.

Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to