Hey Bart- Stof is right, but let me know if that above link doesn't work. Basically, it sounds like if you use a parameter for your database name, then you can import a config.php file that does whatever logic you want to set the value of that parameter.
Flexibility of configuration is one of the things Symfony2 does best - so this should be very simple to handle. Thanks! Ryan Weaver US Office Head & Trainer - KnpLabs - Nashville, TN http://www.knplabs.com <http://www.knplabs.com/en> http://www.thatsquality.com Twitter: @weaverryan On Thu, May 12, 2011 at 10:58 AM, Christophe COEVOET <[email protected]> wrote: > Le 12/05/2011 11:31, Bart Guliker a écrit : > > The company i work for has started developing a content management >> system on top of Symfony 2. The situation we'd like to create is to >> have a separate database per customer. The application itself however >> needs to remain centralised for obvious maintainance related stuff. >> The problem we now face is with logging in. What we'd like to do is >> have customerdomain.com/cms redirect to the central cms system, and >> the domain the request originated from would then serve as an >> indicator for which database to use. >> However, it's very hard if not impossible to make symfony understand >> that the entity manager or db-connection it should choose depends on >> various parameters. For example, i have a custom user entity hooked up >> to an entity manager which has a certain connection associated with >> it. >> We need to make either the connection on that entity manager or the >> entity manager itself dynamic. As far as i can see symfony won't let >> me override the default behavior of the login-related code. >> With an entity you create yourself it's pretty easy, just ask the >> container for a certain entity manager. The login component however >> won't let me do that. >> >> Any chance this could be made a lot easier? Thanks in advance. >> >> check this pull request adding a cookbook entry. It is what you need. > https://github.com/symfony/symfony-docs/pull/273/files > > -- > Christophe | Stof > > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > 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 > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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
