I'm using a small CI codebase to run a simple feature in a larger codebase (a mix of Zend and Syfmony).
That master system uses a bootstrap file to set various global variables that I've accessed by creating a library file. it all works great and I can access the parent system, functions and global vars within my CI app.
BUT... That parent system stores DB connection info in sever related override files (So if code is deployed on server test.server, then config file test.server is loaded, and all relevant vars are set to that server.
What I need to do is tell my DB config file to access those vars. OR, in my model, set hostname, user and pass vars.
I've tried:
$this->db->hostname = GLOBAL_VAR_HOSTNAME;
but that is not working.
So can I pass any data from my library file into a config file, so I can set:
$db['default'] = array(
'hostname' => GLOBAL_VAR_HOSTNAME,
'username' => GLOBAL_VAR_USERNAME,
etc etc
Setting up all the DB info in the standard database config file as new servers are added all the time and they tech leads want to use the existing system for sharing vars.
I'm going for a coffee...