| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
namespace Jet_Form_Builder\Db_Queries\Views; |
| 5 |
|
| 6 |
// If this file is called directly, abort. |
| 7 |
if ( ! defined( 'WPINC' ) ) { |
| 8 |
die; |
| 9 |
} |
| 10 |
|
| 11 |
abstract class View_Base_Custom_Table extends View_Base { |
| 12 |
|
| 13 |
abstract public function table_name(): string; |
| 14 |
|
| 15 |
/** |
| 16 |
* @return string |
| 17 |
*/ |
| 18 |
public function table_prefix(): string { |
| 19 |
global $wpdb; |
| 20 |
|
| 21 |
return $wpdb->prefix; |
| 22 |
} |
| 23 |
|
| 24 |
public function table(): string { |
| 25 |
return $this->table_prefix() . $this->table_name(); |
| 26 |
} |
| 27 |
|
| 28 |
} |
| 29 |
|