1 | <?php |
||
36 | class TableConfiguration |
||
37 | { |
||
38 | use Traits\Language; |
||
39 | |||
40 | /** |
||
41 | * extensionConfiguration |
||
42 | * |
||
43 | * @var array $tableConfiguration |
||
44 | */ |
||
45 | protected $tableConfiguration; |
||
46 | |||
47 | /** |
||
48 | * table |
||
49 | * |
||
50 | * @var string $name |
||
51 | */ |
||
52 | protected $name; |
||
53 | |||
54 | /** |
||
55 | * ExtensionConfigurationUtility constructor. |
||
56 | * |
||
57 | * @param $tableName |
||
58 | */ |
||
59 | public function __construct($tableName) |
||
69 | |||
70 | /** |
||
71 | * getName |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getName() |
||
79 | |||
80 | /** |
||
81 | * getName |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getTitle() |
||
89 | |||
90 | /** |
||
91 | * getColumns |
||
92 | * |
||
93 | * @return array |
||
94 | */ |
||
95 | public function getColumns() |
||
99 | |||
100 | /** |
||
101 | * getColumnConfiguration |
||
102 | * |
||
103 | * @param string $columnName |
||
104 | * @return array |
||
105 | */ |
||
106 | public function getColumnConfiguration($columnName) |
||
121 | |||
122 | /** |
||
123 | * @return array |
||
124 | */ |
||
125 | public static function getAllTables() |
||
133 | } |
||
134 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: