- <?php
- class AdminPrivileges_Db extends BaseObject {
- Function AdminPrivileges_Db() {
- $this->BaseObject( 'AdminPrivileges_Db' );
- }
- Function Db( $driver, $db_config ) {
- $driver = strtolower( $driver );
- switch( $driver ) {
- case 'mysql':
- return new Mysql_AdminPrivileges_Db( $db_config );
- break;
- default:
- return new Dummy_AdminPrivileges_Db( $db_config );
- break;
- }
- }
- }
- ?>