I need to retrieve values from CakePHP's config file database.php from one of my controllers.
I'm maintaining an ex-employee's code, so I'm not positive how much of this adheres to default structures. I'm hoping this is fairly straightforward, but I can't seem to Google the right info.
File: app/config/database.php
class DATABASE_CONFIG
{
var $db1 =
array('driver' => 'mysqli',
'connect' => 'mysql_connect',
'host' => 'localhost',
'login' => 'username',
'password' => 'password',
'database' => 'schema',
'prefix' => '');
}
File: app/controllers/my_controller.php
// here is where I need to retrieve
// the database login and password values
What syntax can I use here? Is it even possible to retrieve these values, or are they only accessible to the guts of the CakePHP framework?