public function __construct(Table $table = null) { $this->table = $table; $this->db = $GLOBALS['wpdb']; }