public static function register( Table $table, $complex_query_class = '', $model_class = '' ) {

		if ( $complex_query_class && ! is_subclass_of( $complex_query_class, 'IronBound\DB\Query\Complex_Query' ) ) {
			throw new \InvalidArgumentException( '$complex_query_class must subclass Complex_Query' );
		}

		if ( $model_class && ! is_subclass_of( $model_class, 'IronBound\DB\Model' ) ) {
			throw new \InvalidArgumentException( '$model_class must subclass Model.' );
		}

		static::$tables[ $table->get_slug() ] = array(
			'table' => $table,
			'query' => $complex_query_class,
			'model' => $model_class
		);

		/** @var \wpdb $wpdb */
		global $wpdb;

		$name = $table->get_table_name( $wpdb );
		$name = preg_replace( "/^{$wpdb->prefix}/", "", $name );

		$wpdb->{$name}  = $table->get_table_name( $wpdb );
		$wpdb->tables[] = $name;

		static::fire_plugin_event( $table, 'registered' );
	}
public static function register( Table $table, $complex_query_class = '', $model_class = '' ) {

		if ( $complex_query_class && ! is_subclass_of( $complex_query_class, 'IronBound\DB\Query\Complex_Query' ) ) {
			throw new \InvalidArgumentException( '$complex_query_class must subclass Complex_Query' );
		}

		if ( $model_class && ! is_subclass_of( $model_class, 'IronBound\DB\Model' ) ) {
			throw new \InvalidArgumentException( '$model_class must subclass Model.' );
		}

		static::$tables[ $table->get_slug() ] = array(
			'table' => $table,
			'query' => $complex_query_class,
			'model' => $model_class
		);

		/** @var \wpdb $wpdb */
		global $wpdb;

		$name = $table->get_table_name( $wpdb );
		$name = preg_replace( "/^{$wpdb->prefix}/", "", $name );

		$wpdb->{$name}  = $table->get_table_name( $wpdb );
		$wpdb->tables[] = $name;

		static::fire_plugin_event( $table, 'registered' );
	}
public static function register ( Table $ table , $ complex_query_class = '' , $ model_class = '' ) { if ( $ complex_query_class && ! is_subclass_of ( $ complex_query_class , 'IronBound\DB\Query\Complex_Query' ) ) { throw new \ InvalidArgumentException ( '$complex_query_class must subclass Complex_Query' ) ; } if ( $ model_class && ! is_subclass_of ( $ model_class , 'IronBound\DB\Model' ) ) { throw new \ InvalidArgumentException ( '$model_class must subclass Model.' ) ; } static :: $ tables [ $ table -> get_slug ( ) ] = array ( 'table' => $ table , 'query' => $ complex_query_class , 'model' => $ model_class ) ; /** @var \wpdb $wpdb */ global $ wpdb ; $ name = $ table -> get_table_name ( $ wpdb ) ; $ name = preg_replace ( "/^{$wpdb->prefix}/" , "" , $ name ) ; $ wpdb -> { $ name } = $ table -> get_table_name ( $ wpdb ) ; $ wpdb -> tables [ ] = $ name ; static :: fire_plugin_event ( $ table , 'registered' ) ; }
Register a db table.

@since 1.0

@param Table  $table Table object.
@param string $complex_query_class
@param string $model_class

@throws \InvalidArgumentException If $complex_query_class is not a subclass of Complex_Query.
Register a db table .