1 | <?php |
||
2 | |||
3 | namespace Jabe\Management; |
||
4 | |||
5 | class TableMetaData |
||
6 | { |
||
7 | protected $tableName; |
||
8 | |||
9 | protected $columnNames = []; |
||
10 | |||
11 | protected $columnTypes = []; |
||
12 | |||
13 | public function __construct(?string $tableName = null) |
||
14 | { |
||
15 | $this->tableName = $tableName; |
||
16 | } |
||
17 | |||
18 | public function addColumnMetaData(string $columnName, string $columnType): void |
||
19 | { |
||
20 | $this->columnNames[] = $columnName; |
||
21 | $this->columnTypes[] = $columnType; |
||
22 | } |
||
23 | |||
24 | public function getTableName(): string |
||
25 | { |
||
26 | return $this->tableName; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
27 | } |
||
28 | |||
29 | public function setTableName(string $tableName): void |
||
30 | { |
||
31 | $this->tableName = $tableName; |
||
32 | } |
||
33 | |||
34 | public function getColumnNames(): array |
||
35 | { |
||
36 | return $this->columnNames; |
||
37 | } |
||
38 | |||
39 | public function setColumnNames(array $columnNames): void |
||
40 | { |
||
41 | $this->columnNames = $columnNames; |
||
42 | } |
||
43 | |||
44 | public function getColumnTypes(): array |
||
45 | { |
||
46 | return $this->columnTypes; |
||
47 | } |
||
48 | |||
49 | public function setColumnTypes(array $columnTypes): void |
||
50 | { |
||
51 | $this->columnTypes = $columnTypes; |
||
52 | } |
||
53 | } |
||
54 |