post-meta-view.php
2 years ago
relation.php
2 years ago
view-base-count-trait.php
2 years ago
view-base.php
2 years ago
view-custom-table-base.php
2 years ago
view-custom-table-base.php
29 lines
| 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 |