1 | <?php |
||
16 | class Factory |
||
17 | { |
||
18 | const CELL_ACTIONS_CONTENT = 'grid:actions'; |
||
19 | const CELL_ACTIONS_GROUP = 'actions'; |
||
20 | |||
21 | /** |
||
22 | * @param array $entities |
||
23 | * @param array $getters |
||
24 | * @param array $headers |
||
25 | * @param array $headerAttributes |
||
26 | * @param array $bodyAttributes |
||
27 | * @param array $tableAttributes |
||
28 | * @param array $gridAttributes |
||
29 | * @param Actions|null $cellActions |
||
30 | * @param Actions|null $gridActions |
||
31 | * @param ITranslator|null $translator |
||
32 | * |
||
33 | * @return Grid |
||
34 | */ |
||
35 | public static function createGrid( |
||
62 | |||
63 | /** |
||
64 | * @param array $entities |
||
65 | * @param array $getters |
||
66 | * @param array $bodyAttributes |
||
67 | * @param Actions|null $actions |
||
68 | * |
||
69 | * @return array|Rows |
||
70 | */ |
||
71 | private static function createTableBody( |
||
92 | |||
93 | /** |
||
94 | * @param array $getters |
||
95 | * @param array $bodyAttributes |
||
96 | * @param IEntity $entity |
||
97 | * |
||
98 | * @return array|Cells |
||
99 | */ |
||
100 | private static function createTableRowCell( |
||
115 | |||
116 | /** |
||
117 | * @param array $headers |
||
118 | * @param array $headerAttributes |
||
119 | * @param Actions|null $actions |
||
120 | * |
||
121 | * @return array|Cells |
||
122 | */ |
||
123 | private static function createTableHeader(array $headers, array $headerAttributes = [], Actions $actions = null) |
||
136 | } |
Let’s assume you have a class which uses late-static binding:
}
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()
on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClass
to useself
instead: