PluginProbe
404 Solution / 4.3.3
404 Solution v4.3.3
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / database / DatabaseTableMetadataInterface.php

DatabaseTableMetadataInterface.php in 404 Solution 4.3.3, at includes/database/DatabaseTableMetadataInterface.php

70 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 exit;
5 }
6
7 /**
8 * Table-name resolution and DDL introspection: prefix, plugin-table names,
9 * CREATE TABLE DDL, table-level and column-level collations, existence,
10 * and column-name listing.
11 */
12 interface ABJ_404_Solution_DatabaseTableMetadataInterface {
13
14 /**
15 * Get the normalized (lowercase) WordPress table prefix.
16 *
17 * @return string
18 */
19 public function getLowercasePrefix(): string;
20
21 /**
22 * Build a fully-qualified plugin table name.
23 *
24 * @param string $tableSuffix e.g. 'abj404_redirects'
25 * @return string
26 */
27 public function getPrefixedTableName($tableSuffix): string;
28
29 /**
30 * Get the CREATE TABLE DDL for an existing table.
31 *
32 * @param string $tableName
33 * @return string
34 */
35 public function getCreateTableDDL($tableName): string;
36
37 /**
38 * Get the table-level default collation for an existing table.
39 *
40 * @param string $tableName
41 * @return string
42 */
43 public function getTableCollationString(string $tableName): string;
44
45 /**
46 * Get the column-level collation for an existing character column.
47 *
48 * @param string $tableName
49 * @param string $columnName
50 * @return string
51 */
52 public function getColumnCollationString(string $tableName, string $columnName): string;
53
54 /**
55 * Check whether a database table exists.
56 *
57 * @param string $tableName
58 * @return bool
59 */
60 public function tableExists($tableName): bool;
61
62 /**
63 * Get column names from an actual database table.
64 *
65 * @param string $tableName
66 * @return array<int, string>
67 */
68 public function getTableColumnNames(string $tableName): array;
69 }
70