- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
function db($class, $configName)
{
eval("class $class extends Database {
public static function staticConstruct()
{
global \$fcConfig;
\$db = \$fcConfig->get('db');
static::\$host = \$db->get('$configName.host');
static::\$user_name = \$db->get('$configName.username');
static::\$user_pass = \$db->get('$configName.password');
static::\$database_name = \$db->get('$configName.dbname');
static::connect();
}
}
\$class::staticConstruct();");
}
db( 'DB', 'connection' );