PluginProbe
WP Synchro – The Ultimate WordPress Migration Tool / trunk
WP Synchro – The Ultimate WordPress Migration Tool vtrunk
1.16.1 1.16.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.10.0 1.11.0 1.11.1 1.11.2 1.11.3 1.11.4 1.11.5 1.12.0 1.13.0 1.14.0 1.15.0 1.2.0 1.3.0 1.3.1 1.3.2 All 45 releases
wpsynchro / src / Database / TableColumns.php

TableColumns.php in WP Synchro – The Ultimate WordPress Migration Tool trunk, at src/Database/TableColumns.php

62 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPSynchro\Database;
4
5 /**
6 * Class for a database table column data
7 */
8 class TableColumns
9 {
10 public $string = [];
11 public $numeric = [];
12 public $bit = [];
13 public $binary = [];
14 public $unknown = [];
15 public $generated = [];
16 public $column_types_used = [];
17
18 public function __construct()
19 {
20 }
21
22 public function addColumnTypeUsed($column_type)
23 {
24 $this->column_types_used[strtolower($column_type)] = true;
25 }
26
27 public function isColumnTypeUsed($column_type)
28 {
29 return isset($this->column_types_used[strtolower($column_type)]);
30 }
31
32 public function isString($column)
33 {
34 return isset($this->string[$column]);
35 }
36
37 public function isNumeric($column)
38 {
39 return isset($this->numeric[$column]);
40 }
41
42 public function isBit($column)
43 {
44 return isset($this->bit[$column]);
45 }
46
47 public function isBinary($column)
48 {
49 return isset($this->binary[$column]);
50 }
51
52 public function isGenerated($column)
53 {
54 return isset($this->generated[$column]);
55 }
56
57 public function getAllColumnNames()
58 {
59 return array_merge($this->string, $this->numeric, $this->bit, $this->binary, $this->unknown, $this->generated);
60 }
61 }
62