1 | <?php |
||
7 | class Model |
||
8 | { |
||
9 | |||
10 | 18 | private static function getConstants() : array |
|
15 | |||
16 | 18 | private static function getConstructorArguments(array $params, array $constants) : array |
|
17 | { |
||
18 | 18 | $arguments = []; |
|
19 | 18 | foreach ($constants as $key => $val) { |
|
20 | 18 | if (isset($params[$key])) { |
|
21 | 18 | $arguments[$key] = $params[$key]; |
|
22 | } |
||
23 | } |
||
24 | 18 | return $arguments; |
|
25 | } |
||
26 | |||
27 | 18 | public static function create(array $params) : self |
|
34 | |||
35 | 9 | public static function getFields() : array |
|
48 | } |
||
49 |