/** * setAdapterType * * Static mutator that sets the adapter type. Logically called before composition. * * @static * @final * @access public * @params Mixed The type of database adapter to be created. */ public static final function setAdapterType( $adapter = NULL ) { if( NULL == $adapter ) { require_once( 'Yeba' . DIRECTORY_SEPARATOR . 'Database' . DIRECTORY_SEPARATOR . 'Exception.class.php' ); throw new Yeba_Database_Exception( Yeba_Database_Exception::EMPTY_ADAPTER_TYPE ); } if( self::isValidAdapter( $adapter ) ) { self::$_adapterType = $adapter; } else { require_once( 'Yeba' . DIRECTORY_SEPARATOR . 'Database' . DIRECTORY_SEPARATOR . 'Exception.class.php' ); throw new Yeba_Database_Exception( Yeba_Database_Exception::INVALID_ADAPTER_TYPE ); } } // end static member setAdapterType