PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.7
Yatra – Travel Booking & Tour Operator Software v3.0.7
3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 All 82 releases
yatra / app / Database / Tables / BaseTable.php

BaseTable.php in Yatra – Travel Booking & Tour Operator Software 3.0.7, at app/Database/Tables/BaseTable.php

41 lines 883 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yatra\Database\Tables;
4
5 /**
6 * Base Table Class
7 *
8 * Parent class for all database table classes.
9 * Handles WordPress prefix and provides common functionality.
10 */
11 abstract class BaseTable
12 {
13 /**
14 * Table name without prefix (to be defined in child classes)
15 */
16 protected static string $table = '';
17
18 /**
19 * Get the full table name with WordPress prefix
20 */
21 public static function getTableName(): string
22 {
23 global $wpdb;
24 return $wpdb->prefix . static::$table;
25 }
26
27 /**
28 * Get the charset collate for table creation
29 */
30 public static function getCharsetCollate(): string
31 {
32 global $wpdb;
33 return $wpdb->get_charset_collate();
34 }
35
36 /**
37 * Get the complete table schema as raw SQL CREATE TABLE statement
38 */
39 abstract public static function getSchema(): string;
40 }
41