public function initialize()
	{
		//throw exception if no database type has been set
		if( ! $this->type )
		{
			//Throw exception
			throw new DbException("Invalid database type provided");
			
		}

		//check the type of  database provided returning instance
		//set the parameter to check in switch clause
		switch ($this->type ) 
		{
			case 'mysql':

				return new MySQL($this->options);

				break;
			
			default:

				throw new DbException("Valid database type provided");
				

				break;
		}

	}
public function initialize()
	{
		//throw exception if no database type has been set
		if( ! $this->type )
		{
			//Throw exception
			throw new DbException("Invalid database type provided");
			
		}

		//check the type of  database provided returning instance
		//set the parameter to check in switch clause
		switch ($this->type ) 
		{
			case 'mysql':

				return new MySQL($this->options);

				break;
			
			default:

				throw new DbException("Valid database type provided");
				

				break;
		}

	}
public function initialize ( ) { //throw exception if no database type has been set if ( ! $ this -> type ) { //Throw exception throw new DbException ( "Invalid database type provided" ) ; } //check the type of  database provided returning instance //set the parameter to check in switch clause switch ( $ this -> type ) { case 'mysql' : return new MySQL ( $ this -> options ) ; break ; default : throw new DbException ( "Valid database type provided" ) ; break ; } }
This method initializes a database connection

@param null
@return object Instance of this database connection
@throws DbException  If the database type provided is not defined for this system
This method initializes a database connection